On 2/23/22 23:45, vtejaswini1@gmail.com wrote:
It would be interesting if there were any official Prometheus exporter to monitor LDAP metrics.
What does "official" mean for you? Does that mean vendor support you're willing to pay for?
Anyway...
My slapdcheck also produces OpenMetrics output to be consumed by Prometheus. But since it's a wrapper around the MRPE checks it does not feel Prometheus-like. It's on my long to-do list to refactor slapdcheck to internally already handle labels and turn that into MRPE/Nagios compatible check item names.
https://code.stroeder.com/ldap/slapdcheck
Help would be appreciated:
https://code.stroeder.com/ldap/slapdcheck/issues
You could also use mtail to extract metrics from logs which mtail also serves as Prometheus metrics:
https://github.com/google/mtail
My mtail progs extract some metrics not available in cn=monitor yet (e.g. result code counters and deferred counters).
https://code.stroeder.com/AE-DIR/ansible-ae-dir-server/src/branch/master/tem...
BTW: There are some simple exporters available out there which simply pull counters and gauges from cn=monitor and use the DN of the monitor entry as the metrics' label. Given that some cn=monitor entries contain multiple values this is not the correct approach. (And full DNs as label also makes your Prometheus queries look quite complicated.)
Ciao, Michael.