tomcz/openldap_exporter

Question LDAP replication

x11tete11x opened this issue · 2 comments

Hi!, i'm trying to get metrics about ldap replication, i use:

/usr/bin/openldap_exporter --config exporter.yaml --replicationObject "dc=my,dc=organization"

But my ldap DB it's quite big and i get:

WARN[0270] query failed                                  component=scraper error="LDAP Result Code 4 \"Size Limit Exceeded\": " filter="(objectClass=*)"

Looking into the code i found this:

func (s *Scraper) addReplicationQueries() {
	for _, q := range s.Sync {
		queries = append(queries,
			&query{
				baseDN:       q,
				searchFilter: objectClass("*"),
				searchAttr:   monitorReplicationFilter,
				metric:       monitorReplicationGauge,
				setData:      setReplicationValue,
			},
		)
	}
}

If i change:

searchFilter: objectClass("*"),

with

searchFilter: "(contextCSN=*)",

it works, so i'm trying to make a fork adding some parameters to override that but i don't know much about go.

So the question is: i'm using this exporter right?, or there is any other way to achieve this?

That seems weird.
This should not happen, By any chance, are you using a Active Directory ?

Hi, no, just, openldap, but it's a quite big DB haha