Page 1 of 1

Active Directory/LDAP Monitoring error

Posted: Fri Mar 04, 2022 11:16 am
by cyberhelp
I am in the middle of getting my Nagios XI configured and set up. I am trying to monitor our Active Directory and when I use the Wizard to add either one Active Directory or LDAP Monitoring I receive the following error

" (No output on stdout) stderr: /bin/sh: 1: Syntax error: Unterminated quoted string "

when I run the following check on the Nagios Servers Commandline interface, it appears to be fine:

./check_ldap -H 192.168.1.9 -b "DC=DOMAIN,DC=local" -D CN=Administrator,CN=Users,DC=DOMAIN,DC=local -P 'PASSWORDHERE' -2 -v

LDAP OK - 0.004 seconds response time|time=0.003987s;;;0.000000

Am I doing something wrong?

Re: Active Directory/LDAP Monitoring error

Posted: Mon Mar 07, 2022 11:11 am
by pbroste
Hello @cyberhelp

Thanks for reaching out, the 'check_ldap' command functions according to the command results. Want to make sure the check command paths are correct:

Code: Select all

ls -l /usr/local/nagios/libexec/ | grep -Ei 'check_ldap'
Results:
-rwxrwxr-x 1 apache nagios 228768 Jun 15 2021 check_ldap
lrwxrwxrwx 1 apache nagios 10 Jun 15 2021 check_ldaps -> check_ldap
Command defined:

Code: Select all

grep -Eir 'check_ldap' /usr/local/nagios/etc/*
Result:
/usr/local/nagios/etc/commands.cfg: command_line $USER1$/check_ldap -H $HOSTADDRESS$ $ARG1$
Defined path:

Code: Select all

grep -Eir 'path' /usr/local/nagios/etc/resource.cfg* -A 1
Results:
/usr/local/nagios/etc/resource.cfg:# Path to the plugins
/usr/local/nagios/etc/resource.cfg-$USER1$=/usr/local/nagios/libexec
--
/usr/local/nagios/etc/resource.cfg:# Path to event handlers
/usr/local/nagios/etc/resource.cfg-#$USER2$=/usr/local/nagios/libexec/eventhandlers
--
/usr/local/nagios/etc/resource.cfg.xi:# Path to the plugins
/usr/local/nagios/etc/resource.cfg.xi-$USER1$=/usr/local/nagios/libexec
--
/usr/local/nagios/etc/resource.cfg.xi:# Path to event handlers
/usr/local/nagios/etc/resource.cfg.xi-#$USER2$=/usr/local/nagios/libexec/eventhandlers
Install all updates found in the Nagios Web Console => Admin => Manage Components => [Check for Updates] then [Install Updates]

Also, the option to configure the 'check_ldap' manually via the Core Configuration Manager.

Are you running with any security apps? like Selinux?

Code: Select all

sestatus
Thanks,
Perry