check_ldap issues with command


#1

I’m using 3.2.0 which has the check_ldap plugin installed by default in my libexec folder and I can run it fine from a command line, but when trying to add it to command.cfg I can’t get it to acknowledge that it exists.

I added the following to my command.cfg:

define command{ command_name check_ldap command_line $USER1$/check_ldap -H $HOSTADDRESS$ -b $ARG1$ -D $ARG2$ -P $ARG3$ }

and I have the following for my check:

define service{ use generic-service host_name host service_description LDAP Authentication check_command check_ldap -b "CN=Administrator,CN=Users,DC=domain,DC=tld" -D "CN=Administrator,CN=Users,DC=domain,DC=tld" -P password }

when checking the config it’s giving me an error telling me that check_ldap isn’t defined anywhere

and I not doing something right?


#2

At least the command is defined in the wrong way.
Have a look at the default commands to see how a service check is defind calling a command and passing ARGUMENTS to the command which in turn transforms the arguments into parameters for the effective command.


#3

it doesn’t seem to matter how I setup the command, it keeps telling me that check_ldap isn’t defined anywhere.


#4

I changed the check to

define service{ use generic-service host_name host service_description LDAP Authentication check_command check_ldap!"CN=Administrator,CN=Users,DC=domain,DC=tld"!"CN=Administrator,CN=Users,DC=domain,DC=tld"!password }

and it works now. guess I figured the error would have been different if it was finding it, but I was calling it wrong.


#5

now i see the problem…

did you change the default config? i have commands.cfg not command.cfg