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.
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
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 1.3.6.1.4.1.2021.8.1.104 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.
I hope this is useful to somebody!
12:34
geek
Comments have been closed for this post. If you've got something to say, please contact me by other means. Thanks!
Archives
...the last 3 months :
Recent Posts
Posts Recently Commented Upon
Ten Most Recent CDs
Currently Listening To
(thanks, last.fm.)
Other Recent Listening
Hair
not much going on - darkish, mostly.Wasting Time On
Reading
Links
Help Save The World
I may not (so far) run the kind of blog that posts social conscience linkage - other friends seem to have it covered better than I could manage (yes, I'm aware that's no excuse), but this doesn't mean that I don't care about the State of ThingsTM.
i donate to :
but there's other things worth worrying about too, like :
Looking For Something ?
Feed ?
yes indeed - a merged feed of my flickr photos, del.icio.us tags and posts here:
Licensing

This weblog is licensed under a Creative Commons License.
Comments (2)
Hrm, I had to change:
use Switch;
to be:
use CGI::Switch;
but even then, I get these errors when running it:
String found where operator expected at ./monitor-jp.pl.1 line 78, near "case "valTotConnexions""
(Do you need to predeclare case?)
String found where operator expected at ./monitor-jp.pl.1 line 80, near "case "valTotSearch""
(Do you need to predeclare case?)
String found where operator expected at ./monitor-jp.pl.1 line 82, near "case "valTotAdd""
(Do you need to predeclare case?)
syntax error at ./monitor-jp.pl.1 line 77, near ") {"
syntax error at ./monitor-jp.pl.1 line 80, near "case "valTotSearch""
syntax error at ./monitor-jp.pl.1 line 82, near "case "valTotAdd""
Execution of ./monitor-jp.pl.1 aborted due to compilation errors.
Posted by micah | February 9, 2004 12:06 PM
Posted on February 9, 2004 12:06
Did you try
perl -MCPAN -e 'install Switch'
instead?
Posted by cos | February 9, 2004 9:35 PM
Posted on February 9, 2004 21:35