tomcz/openldap_exporter

please add latency of query ldap , and custom filter function

yylbfyl opened this issue · 4 comments

  1. In order to monitor the availability of ldap service , please add latency indicator for querying ldap.
    2.when I run openldap_exporter , there is a warning information, I don't know how to set filter in config.yaml , I find the objectClass=monitorOperation is a const , may I set it in config.yaml with variable?

WARN[0120] query failed component=scraper error="LDAP Result Code 1 "Operations Error": 000020D6: SvcErr: DSID-03100836, problem 5012 (DIR_ERROR), data 0\n\x00" filter="(objectClass=monitorOperation)"

1 - Sorry, but i think this kind of request is really specific to the type of LDAP requests you actually make. We could however add a configuration key to actually query the ldap and check the latency. @tomcz: opinion on this ?
2 - My guess is that you are runing an active directory, we are note compatible with this product i'm afraid.

tomcz commented
  1. We could do that, but latency checks for queries are something that I've been considering as beyond the scope of this project. @JGodin-C2C is right, none of the queries made by this monitor reflect user-observable performance of the ldap server that is being monitored, so reporting on their latency should be done by something actually making production-like queries.
  2. Yeah, that most likely looks like active directory and is again beyond what this project is intended to support.

Hey all...

Just an FYI, I'm getting a very similar error in my logs:

time="2023-04-18T13:27:13Z" level=warning msg="query failed" component=scraper error="LDAP Result Code 32 \"No Such Object\": " filter="(objectClass=monitorOperation)"    

When I curl /metrics, I only get the following openldap metrics:
openldap_dial{result="ok"} 67
openldap_scrape{result="fail"} 67
openldap_bind{result="ok"} 67

(and a bunch of various go metrics)

Using the osixia/docker-openldap image. Going to try swapping over to Bitnami to see if there is any difference.

I can confirm the metrics show with the bitnami/openldap image...