Quick note:
I wanted to enable the check_ldap plugin in Nagios. You need to install the following package and recompile before you can use it:
apt-get install libldap2-dev
Quick example on how to use it:
In the commands.cfg:
define command{
command_name check_ldap
command_line $USER1$/check_ldap -H $HOSTADDRESS$ -b dc=david,dc=org -3 -4 -D cn=nagios,cn=Users,dc=david,dc=org -P nagios
}
In the windows.cfg / hosts.cfg:
define service{
use generic-service
host_name my_ldap_server
service_description LDAP
check_command check_ldap
}