ITL: Add "ldap" CheckCommand

refs #9172

Signed-off-by: Michael Friedrich <michael.friedrich@gmail.com>
This commit is contained in:
Élie Bouttier 2015-04-25 06:13:27 +02:00 committed by Michael Friedrich
parent 765c06f7ed
commit 949e626b73
2 changed files with 50 additions and 0 deletions

View File

@ -437,6 +437,24 @@ imap_address | **Optional.** The host's address. Defaults to "$address$" if t
imap_port | **Optional.** The port that should be checked. Defaults to 143.
## <a id="plugin-check-command-ldap"></a> ldap
Check command object for the `check_ldap` plugin.
Custom Attributes:
Name | Description
----------------|--------------
ldap_address | **Optional.** Host name, IP Address, or unix socket (must be an absolute path). Defaults to "$address$" if the host's `address` attribute is set, "$address6$" otherwise.
ldap_port | **Optional.** Port number. Defaults to 389.
ldap_base | **Required.** LDAP base (eg. ou=myunit,o=myorg,c=at).
ldap_bind | **Optional.** LDAP bind DN (if required).
ldap_pass | **Optional.** LDAP password (if required).
ldap_starttls | **Optional.** Use STARTSSL mechanism introduced in protocol version 3.
ldap_ssl | **Optional.** Use LDAPS. This also sets the default port to 636.
ldap_v3 | **Optional.** Use LDAP protocol version 3 (default protocol version: 2)
## <a id="plugin-check-command-load"></a> load
Check command object for the `check_load` plugin.

View File

@ -1334,6 +1334,38 @@ object CheckCommand "icmp" {
vars.icmp_cpl = 15
}
object CheckCommand "ldap" {
import "plugin-check-command"
import "ipv4-or-ipv6"
command = [
PluginDir + "/check_ldap",
"-H", "$ldap_address$",
"-b", "$ldap_base$"
]
arguments = {
"-p" = "$ldap_port$"
"-a" = "$ldap_attr$"
"-D" = "$ldap_bind$"
"-P" = "$ldap_pass$"
"-T" = {
set_if = "$ldap_starttls$"
description = "Use STARTTLS mechanism"
}
"-S" = {
set_if = "$ldap_ssl$"
description = "Use LDAPS. This also sets the default port to 636"
}
"-3" = {
set_if = "$ldap_v3$"
description = "Use LDAP protocol version 3"
}
}
vars.ldap_address = "$check_address$"
}
/* Contrib plugins */
object CheckCommand "running_kernel" {
import "plugin-check-command"