Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

Directory Tree

check_ldap

Rating
2 votes
Favoured:
1
Hits
140637
Files:
FileDescription
check_ldap_fdcheck_ldap_fd
check_ldap.plcheck_ldap.pl
Nagios CSP

Meet The New Nagios Core Services Platform

Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.

Monitoring Made Magically Better

  • Nagios Core on Overdrive
  • Powerful Monitoring Dashboards
  • Time-Saving Configuration Wizards
  • Open Source Powered Monitoring On Steroids
  • And So Much More!
A plugin to check if the ldap server is working
LDAP Monitor for Nagios version 1.0

GPL licence, (c)2006-2007 De Bodt Lieven

Usage: ./check_ldap.pl -H -l login -x passwd -p -s -t -V
-h, --help
print this help message
-H, --hostname=HOST
name or IP address of host to check
-l, --login=LOGIN
Login for ldap authentication (if not specified ./check_ldap.pl uses anonymous)
-x, --passwd=PASSWD
Password for ldap authentication
-p, --port=PORT
LDAP port (Default 389)
-s, --ssl
LDAPS (Default false, if true, default port is 636 )
-t, --timeout=INTEGER
timeout in seconds (Default: 15)
-V, --version
prints version number
Note :
The script will return

OK if we are able to connect and bind to the LDAP server,
WARNING if we are able to connect but not bind to the LDAP server
CRITICAL if we aren't able to connect to the LDAP server

Reviews (2)
In case the script just fails with CRITICAL and no error msg, it is because $ldap has not be created due to SSL cipher negociation problem.

Patch below fixes the issue:

--- check_ldap.pl.orig 2024-11-01 09:43:44.616030489 +0100
+++ check_ldap.pl 2024-11-01 09:43:51.356022937 +0100
@@ -113,9 +113,9 @@
}
} else {
if (defined($o_port)) {
- $ldap = Net::LDAPS->new( $o_host, port => $o_port, version => 3, timeout => $o_timeout );
+ $ldap = Net::LDAPS->new( $o_host, port => $o_port, version => 3, timeout => $o_timeout, sslversion => 'tlsv1_2' );
} else {
- $ldap = Net::LDAPS->new( $o_host, port => $o_ldaps_port, version => 3, timeout => $o_timeout );
+ $ldap = Net::LDAPS->new( $o_host, port => $o_ldaps_port, version => 3, timeout => $o_timeout, sslversion => 'tlsv1_2' );
}
}
byelpatron, January 16, 2018
Thanks, no prolems here.

My Debian needed a
`sudo apt-get install libnet-ldap-perl`.