openldap_exporter icon indicating copy to clipboard operation
openldap_exporter copied to clipboard

Question LDAP replication

Open x11tete11x opened this issue 2 years ago • 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?

x11tete11x avatar Feb 01 '23 20:02 x11tete11x

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

JGodin-C2C avatar Feb 08 '23 09:02 JGodin-C2C

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

x11tete11x avatar Feb 08 '23 11:02 x11tete11x