Thank you very much for your detailed guidance Michael. I will continue to investigate.
Many thanks for your continuous help Brian. On Thursday, July 28, 2022 at 4:51:32 PM UTC+8 Michael Ströder wrote: > On 7/28/22 05:56, nina guo wrote: > > I want to compare the value of contextCSN from each ldap server. > > You seem to be using OpenLDAP. > > Note that contextCSN values have to be compared pair-wise distinguished > by serverID. > > The OpenMetrics output of my slapdcheck [1] is still not really nice > because it's mainly a compat wrapper around the legacy monitoring data. > But you can query the metrics and it already does the pair-wise > contextCSN comparison. > > I usually invoke slapdcheck as systemd one-shot service [2] triggered by > a systemd timer unit [3] and let it write the output to a file to be > collected by node-exporter's text-file collector. (The caveat is that > the metrics time is not the same like the collect time.) > > BTW: I find it also useful to let mtail extract some other metrics from > OpenLDAP stats log level messages [4]. Beware the example adds client IP > addresses to labels which can lead to time-series explosion if you have > many LDAP clients from different IP addresses. Adapt it to your needs. > > [1] https://code.stroeder.com/ldap/slapdcheck > > [2] > > https://code.stroeder.com/AE-DIR/ansible-ae-dir-server/src/branch/main/templates/systemd/slapdcheck.service.j2 > > [3] > > https://code.stroeder.com/AE-DIR/ansible-ae-dir-server/src/branch/main/templates/systemd/slapdcheck.timer.j2 > > [4] > > https://code.stroeder.com/AE-DIR/ansible-ae-dir-server/src/branch/main/templates/mtail/ae-slapd.mtail.j2 > > Ciao, Michael. > -- You received this message because you are subscribed to the Google Groups "Prometheus Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/3d268f19-420a-4e6d-b63a-084acb545a57n%40googlegroups.com.

