NAME
Monitoring::Sneck::Checks::ldap - checks a LDAP server binds and searches, timing it
VERSION
Version 0.0.1
SYNOPSIS
ldap|perl:ldap -H ldap.example.org
ldap_tls|perl:ldap -H ldap.example.org -s -w 0.5 -c 2
ldaps|perl:ldap -H ldap.example.org -S
ldap_users|perl:ldap -H ldap.example.org -s -D cn=monitor,dc=example,dc=org -P /etc/sneck/ldap.pw -b ou=people,dc=example,dc=org --scope one -f '(uid=*)' -E 10:
DESCRIPTION
Connects, binds, searches, and unbinds, through Net::LDAP, timing it all. Net::LDAP is not required to install this, but this check needs it.
The bind is anonymous unless --bind-dn is given. Without --base, it reads the root DSE, the empty base with a base scope, which most servers answer anonymously.
- CRITICAL :: Not connecting. StartTLS failing. The bind or search failing. The entries found outside of --entries. The time over --critical.
- WARNING :: The time over --warning.
- UNKNOWN :: Net::LDAP not being installed, or --password-file not being readable.
With --starttls, StartTLS is done before binding. With --ssl, it connects over TLS from the start, as for port 636. The certificate is checked unless --insecure is given. See Monitoring::Sneck::Checks::https_cert with --starttls ldap for when it expires.
A search hitting the server's size limit is not a failure, as it still returns entries.
OPTIONS
- -H, --hostname :: The host. Required.
- -p, --port :: The port. Default :: 389, or 636 with --ssl
- -S, --ssl :: Connect over TLS. Can not be used with --starttls.
- -s, --starttls :: Do StartTLS before binding. Can not be used with --ssl.
- -D, --bind-dn :: The DN to bind as.
- --password :: The password to bind with. --password-file is better, as this can show up in ps when run through sneck_check.
- -P, --password-file :: A file with the password, its first line being it.
- -b, --base :: The base to search. Default :: the empty base, the root DSE
- --scope :: base, one, or sub. Default :: base
- -f, --filter :: The filter to search with. Default :: (objectClass=*)
- -E, --entries :: Range for how many entries the search finds. Default :: 1:
- -w, --warning :: Range of seconds for the whole of it.
- -c, --critical :: Range of seconds for the whole of it.
- --insecure :: Do not check the certificate.
- --ca-file :: The CA file to check the certificate against.
METHODS
check
Does the check.