Module: check_mk
Branch: master
Commit: 4027c1bab238c180d188e14230c1243b91da6354
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4027c1bab238c1…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Sun May 13 11:15:17 2012 +0200
WATO formalization of check_ldap
Check definition still missing
---
web/plugins/wato/active_checks.py | 100 +++++++++++++++++++++++++++++++++++++
1 files changed, 100 insertions(+), 0 deletions(-)
diff --git a/web/plugins/wato/active_checks.py b/web/plugins/wato/active_checks.py
index 1de87fd..0308db4 100644
--- a/web/plugins/wato/active_checks.py
+++ b/web/plugins/wato/active_checks.py
@@ -383,6 +383,106 @@ register_rule(group,
),
match = 'all')
+register_rule(group,
+ "active_checks:ldap",
+ Tuple(
+ title = _("Check access to LDAP service"),
+ help = _("This check uses <tt>check_ldap</tt> from the standard
"
+ "Nagios plugins in order to try the response of an LDAP "
+ "server."),
+ elements = [
+ TextAscii(
+ title = _("Base DN"),
+ help = _("LDAP base, e.g. ou=Development, o=Mathias Kettner GmbH,
c=de"),
+ allow_empty = False,
+ size = 60),
+ Dictionary(
+ title = _("Optional parameters"),
+ elements = [
+ ( "attribute",
+ TextAscii(
+ title = _("Attribute to search"),
+ help = _("LDAP attribute to search, "
+ "The default is
<tt>(objectclass=*)</tt>."),
+ size = 40,
+ allow_empty = False,
+ default_value = "(objectclass=*)",
+ )
+ ),
+ ( "authentication",
+ Tuple(
+ title = _("Authentication"),
+ elements = [
+ TextAscii(
+ title = _("Bind DN"),
+ help = _("Distinguished name for binding"),
+ allow_empty = False,
+ size = 60,
+ ),
+ TextAscii(
+ title = _("Password"),
+ help = _("Password for binding, if you server
requires an authentication"),
+ allow_empty = False,
+ size = 20,
+ )
+ ]
+ )
+ ),
+ ( "port",
+ Integer(
+ title = _("TCP Port"),
+ help = _("Default is 389 for normal connetions and 636 for
SSL connections."),
+ minvalue = 1,
+ maxvalue = 65535,
+ default_value = 389)
+ ),
+ ( "ssl",
+ FixedValue(
+ value = True,
+ totext = _("Use SSL"),
+ title = _("Use LDAPS (SSL)"),
+ help = _("Use LDAPS (LDAP SSLv2 method). This sets the
default port number to 636"))
+
+ ),
+ ( "version",
+ DropdownChoice(
+ title = _("LDAP Version"),
+ help = _("The default is to use version 2"),
+ choices = [
+ ( "v2", _("Version 2") ),
+ ( "v3", _("Version 3") ),
+ ( "v3tls", _("Version 3 and TLS") ),
+ ],
+ default_value = "v2",
+ )
+ ),
+ ( "response_time",
+ Tuple(
+ title = _("Expected response time"),
+ elements = [
+ Float(
+ title = _("Warning at"),
+ unit = "ms",
+ default_value = 1000.0),
+ Float(
+ title = _("Critical at"),
+ unit = "ms",
+ default_value = 2000.0),
+ ])
+ ),
+ ( "timeout",
+ Integer(
+ title = _("Seconds before connection times out"),
+ unit = _("sec"),
+ default_value = 10,
+ )
+ ),
+ ])
+ ]),
+ match = 'all'
+)
+
+
register_rule(group,
"custom_checks",