Module: check_mk
Branch: master
Commit: eff0e4366f2dd4ba99f9af0386176bd634500855
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=eff0e4366f2dd4…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Feb 26 09:59:29 2013 +0100
FIX: check_ldap: added missing version option
---
ChangeLog | 1 +
checks/check_ldap | 8 ++++++++
2 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index d4ee3ee..18b6c7e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -54,6 +54,7 @@
* FIX: jolokia_metrics.mem: renamed parameter totalheap to total
* FIX: megaraid_bbu: deal with broken output ("Adpater")
* FIX: check_ldap: added missing host address (check didn't work at all)
+ * FIX: check_ldap: added missing version option -2, -3, -3 -T (TLS)
* Linux agent: limit netstat to 10 seconds
* ps: Allow %1, %2, .. instead of %s in process_inventory. That allows
reordering of matched groups
diff --git a/checks/check_ldap b/checks/check_ldap
index 89b516b..da811db 100644
--- a/checks/check_ldap
+++ b/checks/check_ldap
@@ -25,6 +25,7 @@
# Boston, MA 02110-1301 USA.
def check_ldap_arguments(params):
+ print params
name, basedn, settings = params
args = ' -b %s' % quote_shell_string(basedn)
@@ -48,6 +49,13 @@ def check_ldap_arguments(params):
if "port" in settings:
args += ' -p %d' % settings["port"]
+ if "version" in settings:
+ args += {
+ "v2" : " -2",
+ "v3" : " -3",
+ "v3tls" : " -3 -T",
+ }[settings["version"]]
+
if settings.get("ssl"):
args += ' --ssl'