diff options
-rw-r--r-- | debian/changelog | 1 | ||||
-rwxr-xr-x | nagios-plugins/check_ldap_root | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog index 89a408d..fd6f165 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,7 @@ sitesummary (0.0.74) UNRELEASED; urgency=low - Ignore devtmpfs, the same way tmpfs is ignored. - Only check Linux software RAID if a RAID is enabled and not only when /proc/mdstat is present. + - Report missing ldapsearch tool from check_ldap_root. * Collect /etc/lsb-release if present to have more detailed version information on Ubuntu. diff --git a/nagios-plugins/check_ldap_root b/nagios-plugins/check_ldap_root index a4ce47f..64c78f8 100755 --- a/nagios-plugins/check_ldap_root +++ b/nagios-plugins/check_ldap_root @@ -15,6 +15,13 @@ fi ldapserver=$1 shift +if type ldapsearch > /dev/null 2>&1 ; then + : +else + echo "Missing the ldapsearch tool, unable to check LDAP server." + exit 2 +fi + if ldapsearch -l 3 -LLL -h $ldapserver -x -b '' -s base > /dev/null 2>&1 ; then echo "OK - Searching for LDAP root DSE worked on $ldapserver" exit 0 |