[Pkg-nagios-changes] [pkg-nagios-plugins-contrib] 04/18: Add check_ldap_root module from the sitesummary-client package.

Bernd Zeimetz bernd at bzed.de
Wed Oct 1 11:13:15 UTC 2014


This is an automated email from the git hooks/post-receive script.

bzed pushed a commit to branch master
in repository pkg-nagios-plugins-contrib.

commit 17f60c147a2aa02d4630f1e8a21299b0d20238ee
Author: Petter Reinholdtsen <pere at hungry.com>
Date:   Thu Sep 11 10:36:35 2014 +0200

    Add check_ldap_root module from the sitesummary-client package.
---
 check_ldap_root/Makefile        |  5 +++++
 check_ldap_root/check_ldap_root | 35 +++++++++++++++++++++++++++++++++++
 check_ldap_root/control         |  6 ++++++
 check_ldap_root/copyright       | 14 ++++++++++++++
 4 files changed, 60 insertions(+)

diff --git a/check_ldap_root/Makefile b/check_ldap_root/Makefile
new file mode 100644
index 0000000..fbe7697
--- /dev/null
+++ b/check_ldap_root/Makefile
@@ -0,0 +1,5 @@
+#/usr/bin/make -f
+
+PLUGIN = check_ldap_root
+
+include ../common.mk
diff --git a/check_ldap_root/check_ldap_root b/check_ldap_root/check_ldap_root
new file mode 100755
index 0000000..2eaa99d
--- /dev/null
+++ b/check_ldap_root/check_ldap_root
@@ -0,0 +1,35 @@
+#!/bin/sh
+#
+# Author: Petter Reinholdtsen <pere at hungry.com>
+# Date: 2011-12-22
+# License: GNU GPL v2 or later
+#
+# 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 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
+else
+    echo "Failed to fetch root DSE from LDAP server $ldapserver."
+    exit 1
+fi
diff --git a/check_ldap_root/control b/check_ldap_root/control
new file mode 100644
index 0000000..237667c
--- /dev/null
+++ b/check_ldap_root/control
@@ -0,0 +1,6 @@
+Uploaders: Petter Reinholdtsen <pere at hungry.com>
+Description: plugin to check LDAP server response
+ Make sure the LDAP server is able to respond by searching for the
+ root DSE.
+Recommends: ldap-utils
+Version: ?
diff --git a/check_ldap_root/copyright b/check_ldap_root/copyright
new file mode 100644
index 0000000..08d8906
--- /dev/null
+++ b/check_ldap_root/copyright
@@ -0,0 +1,14 @@
+Copyright (C) 2011 Petter Reinholdtsen <pere at hungry.com>
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or (at
+your option) any later version.
+
+This program is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, see <http://www.gnu.org/licenses/>.

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-nagios/pkg-nagios-plugins-contrib.git



More information about the Pkg-nagios-changes mailing list