diff options
author | Petter Reinholdtsen <pere@hungry.com> | 2011-12-22 17:46:39 +0000 |
---|---|---|
committer | Petter Reinholdtsen <pere@hungry.com> | 2011-12-22 17:46:39 +0000 |
commit | f3758c615c80219b924c90fb504847491b5b4449 (patch) | |
tree | 16ab1f454c843e62794b21bad667a881f6812f6a | |
parent | e6fc226fcf842b0226e5a4194c726389acd60649 (diff) | |
download | sitesummary-f3758c615c80219b924c90fb504847491b5b4449.tar.gz sitesummary-f3758c615c80219b924c90fb504847491b5b4449.tar.bz2 sitesummary-f3758c615c80219b924c90fb504847491b5b4449.tar.xz |
Add forgotten nagios plugin check_ldap_root to package.
-rw-r--r-- | debian/changelog | 6 | ||||
-rwxr-xr-x | nagios-plugins/check_ldap_root | 24 |
2 files changed, 30 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog index 7fc3f1b..b701173 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +sitesummary (0.0.73) UNRELEASED; urgency=low + + * Add forgotten nagios plugin check_ldap_root to package. + + -- Petter Reinholdtsen <pere@debian.org> Thu, 22 Dec 2011 18:45:52 +0100 + sitesummary (0.0.72) unstable; urgency=low * Add support for remapping hostnames for individual client entries, diff --git a/nagios-plugins/check_ldap_root b/nagios-plugins/check_ldap_root new file mode 100755 index 0000000..a4ce47f --- /dev/null +++ b/nagios-plugins/check_ldap_root @@ -0,0 +1,24 @@ +#!/bin/sh +# +# Make sure the LDAP server is able to respond by searching for the +# root DSE. + +set -e + +PATH=/bin:/sbin:/usr/sbin:/usr/bin + +if [ -z "$1" ] ; then + echo "No LDAP server specified on command line" + exit 1 +fi + +ldapserver=$1 +shift + +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 +else + echo "Failed to fetch root DSE from LDAP server $ldapserver." + exit 1 +fi |