Two plugins monitor OpenLDAP behaviour. Each plugin monitors several different aspects of the running slapd and the database backend, it all depends on the symlinking. Both are available from http://wiki.ruberg.no/cgi-bin/cvsweb/munin-plugins/
Both plugins are tested to work with OpenLDAP 2.1, 2.2, and they should also both be properly detected and installed through munin-node-configure.
slapd_
This plugin requires the Perl module Net::LDAP.
It also requires that you activate the internal cn=monitor LDAP tree:
1. Check your slapd.conf file for the presence of the "moduleload" directive. If not there already, add a new line specifying back_monitor.
moduleload back_bdb moduleload back_monitor
2. After your regular LDAP DIT configurations, add something like this:
# Backend monitor
database monitor
access to dn.subtree="cn=monitor"
by dn.exact="cn=munin,dc=fakecompany,dc=com" read
3. Create the LDAP user account cn=munin,dc=fakecompany,dc=com. A simple LDAP object will suffice, e.g. like this:
dn: cn=munin,dc=fakecompany,dc=com cn: munin userPassword:: T3N0ZWtha2U= objectClass: organizationalRole objectClass: simpleSecurityObject
4. In the Munin behaviour files (/etc/munin/plugin-conf.d/*), add this (adapted to your environment, of course):
[slapd_*] env.binddn cn=munin,dc=fakecompany,dc=com env.bindpw UltraSecretPassword
5. If this has not been completed through munin-node-configure, symlink the slapd_ file to the following targets:
slapd_statistics_bytes slapd_statistics_pdu slapd_statistics_other slapd_connections slapd_waiters slapd_operations slapd_operations_diff
6. Restart munin and you're good to go.
Temporary note:
09:09:09 Ola-G> Skrevet for openldap2.2?
09:09:19 Ola-G> pluginen din altså
09:09:32 beorn> Funker i 2.1 også tror jeg
09:09:39 beorn> Så lenge du har monitor-backenden aktiv
09:09:43 Ola-G> njet - ikke uten videre
09:09:56 beorn> Men db_stat-greiene fungerer bare med bdb
09:10:01 Ola-G> Jepp.
09:10:09 beorn> Og OpenLDAP før 2.2 hadde ldbm som default backend
09:10:44 Ola-G> cn=Waiters eksisterer ikke i 2.1 her, derimot cn=Read Waiters
og cn=Write Waiters
OpenLDAP 2.3.x is similar to 2.2. Kool.
slapd_bdb_pages
This plugin requires the appropriate set of Berkeley DB tools, specifically db_stat (in some variant or other, e.g. Debian likes to annotate them with version numbers like db4.2_stat and so on). You need the same release/version as the one OpenLDAP was compiled with.
The plugin also requires that you use the BDB backend. Even though the LDBM backend often uses BerkeleyDB, the necessary meta information is not stored when using LDBM.
To cut to the chase:
This plugin must be run as the user that slapd runs as, or more specifically, the users who owns the database files. Hint: Search for the directory directive in slapd.conf. When you have found that out, enter something like this in the Munin behaviour files (/etc/munin/plugin-conf.d/*):
[slapd_bdb_cache*] user openldap
Then, check the path to the LDAP database files, given in slapd.conf, and make sure the plugin points to that directory. For the time being, the directory location is hard coded to work with Debian. I'll fix this later.
If all the above is all right, one thing remains:
cd /etc/munin/plugins ln -s slapd_bdb_cache slapd_bdb_cache_pages
Now, restart Munin and you should be ready to roll.