« the music plays all night in shangri-la | Main | fading »

monitoring your openldap server with cricket

Cricket's fairly addictive - once you get the hang of adding new stuff, you find yourself wanting to Graph The World. OpenLDAP has a monitor backend that'll tell you some occasionally interesting statistics about what's been going on, making it a candidate for being Cricketed. I didn't find anything on the net for OpenLDAP and Cricket, but I did find a paper by Jehan Procaccia on monitoring OpenLDAP with MRTG, which was easy enough to adapt. I did this on Debian.

  1. Enable the monitor backend of OpenLDAP. Debian/unstable's OpenLDAP 2.1 package builds the backends as loadable modules, so in addition to what the original document suggests, you should add :

    moduleload back_monitor
  2. Setup net-snmp to grab the statistics. If your LDAP server's running on the same machine as Cricket, you don't have to do this (you could just have Cricket run the monitor-jp.pl script directly). Modifying the original instructions, this is what I added to the end of my /etc/snmp/snmpd.conf file (make sure it's on one line - I've wrapped it for Added Reader Sanity):

    exec monitor-jp.pl
      /usr/share/cricket/util/monitor-jp.pl 1 snmpd

    I modified the original monitor-jp.pl script to have the "snmpd" mode to output all the values at once for snmpd to put in a table, rather than running the script once for each value. Here's my modified monitor-jp.pl.

  3. Configure Cricket. Here's my Defaults and Targets files.

I hope this is useful to somebody!

* 12:34 * geek