Return code of 127 for check of service check LDAP
Posted: Thu Jan 07, 2016 7:38 pm
Hi,
I'm trying to monitor our LDAp & AD servers using /usr/local/nagios/libexec/check_ldap.
OS: Linux 2.6.32-504.3.3.el6.x86_64 #1 SMP Fri Dec 12 16:05:43 EST 2014 x86_64 x86_64 x86_64 GNU/Linux
Nagios Version: Nagios XI 5.2.3
./check_ldap -V
check_ldap v2.0.3 (nagios-plugins 2.0.3)
Permissions on file:
[root@myhost libexec]# ls -l check_ldap
-rwxrwxr-x 1 apache nagios 157786 Jan 12 2015 check_ldap
Using the CLI:
[nagios@myhost libexec]$ ./check_ldap -H AD-Host1 -b "dc=ad,dc=home" -D "AD-User" -P "AD-user-password" -w 0.5 -c 1 -t 5 -3
LDAP OK - 0.270 seconds response time|time=0.270271s;;1.000000;0.000000
[nagios@myhost libexec]$ ./check_ldap -H AD-Host2 -b "dc=ad,dc=home" -D "AD-User" -P "AD-user-password" -w 0.5 -c 1 -t 5 -3
LDAP OK - 0.007 seconds response time|time=0.007381s;;1.000000;0.000000
[nagios@myhost libexec]$ ./check_ldap -H AD-Host3 -b "dc=ad,dc=home" -D "AD-User" -P "AD-user-password" -w 0.5 -c 1 -t 5 -3
LDAP OK - 0.008 seconds response time|time=0.008099s;;1.000000;0.000000
[nagios@myhost libexec]$ ./check_ldap -H AD-Host4 -b "dc=ad,dc=home" -D "AD-User" -P "AD-user-password" -w 0.5 -c 1 -t 5 -3
LDAP OK - 0.023 seconds response time|time=0.023384s;;1.000000;0.000000
or to check out LDAP server:
[nagios@myhost libexec]$ ./check_ldap -H ldap1 -b "dc=home,dc=priv,dc=au" -w 0.5 -c 1 -t 5 -3
LDAP OK - 0.025 seconds response time|time=0.025384s;;1.000000;0.000000
[nagios@myhost libexec]$ ./check_ldap -H ldap2 -b "dc=home,dc=priv,dc=au" -w 0.5 -c 1 -t 5 -3
LDAP OK - 0.014 seconds response time|time=0.014159s;;1.000000;0.000000
This locks to me as if it is working.
However, in the nagios.log file and the GUI I see the following:
[1452211915] Warning: Return code of 127 for check of service 'check Active Directory' on host 'AD-Host1.ad.home' was out of bounds. Make sure the plugin you're trying to run actually exists.
I have tried:
and
to no avail.
Any help would be appreciated.
Cheers,
hw
I'm trying to monitor our LDAp & AD servers using /usr/local/nagios/libexec/check_ldap.
OS: Linux 2.6.32-504.3.3.el6.x86_64 #1 SMP Fri Dec 12 16:05:43 EST 2014 x86_64 x86_64 x86_64 GNU/Linux
Nagios Version: Nagios XI 5.2.3
./check_ldap -V
check_ldap v2.0.3 (nagios-plugins 2.0.3)
Permissions on file:
[root@myhost libexec]# ls -l check_ldap
-rwxrwxr-x 1 apache nagios 157786 Jan 12 2015 check_ldap
Using the CLI:
[nagios@myhost libexec]$ ./check_ldap -H AD-Host1 -b "dc=ad,dc=home" -D "AD-User" -P "AD-user-password" -w 0.5 -c 1 -t 5 -3
LDAP OK - 0.270 seconds response time|time=0.270271s;;1.000000;0.000000
[nagios@myhost libexec]$ ./check_ldap -H AD-Host2 -b "dc=ad,dc=home" -D "AD-User" -P "AD-user-password" -w 0.5 -c 1 -t 5 -3
LDAP OK - 0.007 seconds response time|time=0.007381s;;1.000000;0.000000
[nagios@myhost libexec]$ ./check_ldap -H AD-Host3 -b "dc=ad,dc=home" -D "AD-User" -P "AD-user-password" -w 0.5 -c 1 -t 5 -3
LDAP OK - 0.008 seconds response time|time=0.008099s;;1.000000;0.000000
[nagios@myhost libexec]$ ./check_ldap -H AD-Host4 -b "dc=ad,dc=home" -D "AD-User" -P "AD-user-password" -w 0.5 -c 1 -t 5 -3
LDAP OK - 0.023 seconds response time|time=0.023384s;;1.000000;0.000000
or to check out LDAP server:
[nagios@myhost libexec]$ ./check_ldap -H ldap1 -b "dc=home,dc=priv,dc=au" -w 0.5 -c 1 -t 5 -3
LDAP OK - 0.025 seconds response time|time=0.025384s;;1.000000;0.000000
[nagios@myhost libexec]$ ./check_ldap -H ldap2 -b "dc=home,dc=priv,dc=au" -w 0.5 -c 1 -t 5 -3
LDAP OK - 0.014 seconds response time|time=0.014159s;;1.000000;0.000000
This locks to me as if it is working.
However, in the nagios.log file and the GUI I see the following:
[1452211915] Warning: Return code of 127 for check of service 'check Active Directory' on host 'AD-Host1.ad.home' was out of bounds. Make sure the plugin you're trying to run actually exists.
I have tried:
and
to no avail.
Any help would be appreciated.
Cheers,
hw