Page 1 of 1

LDAP bind check fails

Posted: Fri Nov 18, 2011 3:44 pm
by txwomansu
I am having issues configuring a service check with check_ldap command. I tried your ldap wizard, provided base, DN, username, and password but I get "null" result from the service check. Then I created a custom command check_ldap_plaintext with this command line: $USER1$/check_ldap -H $HOSTADDRESS$ -b $ARG1$ -D $ARG2$ -P $USER777$. I created a service that uses this command and provided all the arguments. The server is listening on default port (tcp 389). I get "Cannot bind to the ldap server" error on NagiosXI. When I check the bind from my PC with an external tool using the same base, DN, account - everything works, and I get a successful bind...

When I run this check directly from the library [root@nagiosxi libexec]# ./check_ldap ........ I get LDAP OK.....

Please advise. I could not find anything about this in forum/wiki...

Thanks.

Re: LDAP bind check fails

Posted: Fri Nov 18, 2011 4:36 pm
by txwomansu
I noticed that the actual command line adds a bunch of '!!!!!' at the end of the command line unde Configure Service/Monitoring.

What symbol do you use as 'escape character' in strings? In other words, if the password contains an '!', how to include this special character in the password string without causing confusion for NagiosXI software since '!' is the delimiter for arguments that are being passed from service check to the command definition..?

Thanks.

Re: LDAP bind check fails

Posted: Sun Nov 20, 2011 5:23 pm
by jsmurphy
the '\' character escapes :)

Re: LDAP bind check fails

Posted: Tue Dec 06, 2011 5:06 pm
by txwomansu
Thank you so much! The issue is resolved.