OpenLDAP performance and replication monitoring with Hobbit
We run a number of OpenLDAP servers, currently we have about 11 in production (depending how you count clusters) and a few in DR sites etc.
We have been doing performance monitoring in the past (ie running scripts via snmp, monitoring with mrtg), but it seemed logical to move it to Hobbit and do everything in one place (useful for the syncrepl monitoring below).
We have two separate instances that we manage, only one currently uses Hobbit for production monitoring (the other installation has hobbit installed, which is publicly accessible at present, but isn't used for production monitoring). The instance with the publicly accessible installation has OpenLDAP 2.1 and 2.2 servers, the other one has OpenLDAP 2.3 servers (using sync replication).
So, I have written an extension script using perl-ldap (and Date::Manip) which we are now using via Hobbit's ncv module for performance monitoring. Replication status of sync-repl slaves is also checked (green for in sync, yellow for out of sync, clear if the sync-repl master could not be contacted to check the contextCSN, green if it is not a sync-repl slave).
The script is available here: http://www.zarb.org/~bgmilne/bb-openldap.pl
An extract from hobbitgraph.cfg is available here:
http://www.zarb.org/~bgmilne/hobbitgraph-ol.cfg
Some examples:
http://196.25.211.20/hobbit/ldap/ldap.html
Slave running OpenLDAP 2.2.x: http://196.25.211.20/hobbit-cgi/bb-hostsvc.sh?HOSTSVC=io.ol Master cluster running OpenLDAP 2.1.x: http://196.25.211.20/hobbit-cgi/bb-hostsvc.sh?HOSTSVC=metis.ol
The only problem is with the parsing in ncv when a slave is out of sync. For slaves using sync-repl (no examples publicly available for now), the "&green Not a syncrepl slave" can be something like: &yellow dc=mydomain,dc=com out of sync 4 weeks 4 days 15:5:11 behind or &green dc=mydomain,dc=com in sync
(with one such line for each syncrepl database, we have two or more on our production OL 2.3 boxen)
Now, I could s/:/;/g or similar, but it would be nice if there were a way to prevent ncv from parsing a line (since I would also like to be able to graph the CIM extension results with ncv, but it has output and &green/&yellow/&red's all over).
Regards, Buchan
-- Buchan Milne ISP Systems Specialist B.Eng,RHCE(803004789010797),LPIC-2(LPI000074592)
On Tue, Dec 13, 2005 at 04:53:34PM +0200, Buchan Milne wrote:
Now, I could s/:/;/g or similar, but it would be nice if there were a way to prevent ncv from parsing a line (since I would also like to be able to graph the CIM extension results with ncv, but it has output and &green/&yellow/&red's all over).
In Hobbit 4.2, you can configure the exact data-sets that you want the NCV module to look at. E.g. if you have "weather" data like
Current time 14:20:34 Temperature: 23
then the old (4.1.x) NCV module would pick up a "Currenttime14" dataset and a "Temperature" dataset. In 4.2, you configure hobbitserver.cfg with
NCV_weather="Temperature:GAUGE,*:NONE"
and it will only track the "Temperature" dataset.
Regards, Henrik
participants (2)
-
bgmilne@staff.telkomsa.net
-
henrik@hswn.dk