NAME

Nagios::Plugin::LDAP - Nagios plugin to observe LDAP.

SYNOPSIS

use Nagios::Plugin::LDAP;

my $np = Nagios::Plugin::LDAP->new;
$np->run;

DESCRIPTION

Please setup your nagios config.

### check response time(msec) for LDAP
define command {
  command_name    check_ldap_response
  command_line    /usr/bin/check_ldap -H $HOSTADDRESS$ -w 3 -c 5
}

This plugin can execute with all threshold options together.

Command Line Options

Usage: check_ldap -H <host> -b <base_dn> [-p <port>] [-a <attr>] [-D <binddn>]
       [-P <password>] [-w <warn_time>] [-c <crit_time>] [-t timeout]
       [-2|-3] [-4|-6]

Options:
 -h, --help
    Print detailed help screen
 -V, --version
    Print version information
 -H, --hostname=ADDRESS
    Host name, IP Address, or unix socket (must be an absolute path)
 -M, --master=ADDRESS
    Host name or IP Address of master LDAP server to check replication
 -p, --port=INTEGER
    Port number (default: 389)
 -4, --use-ipv4
    Use IPv4 connection
 -6, --use-ipv6
    Use IPv6 connection
 -a [--attr]
    ldap attribute to search (default: "(objectclass=*)"
 -b [--base]
    ldap base (eg. ou=my unit, o=my org, c=at
 -D [--bind]
    ldap bind DN (if required)
 -P [--pass]
    ldap password (if required)
 -T [--starttls]
    use starttls mechanism introduced in protocol version 3
 -S [--ssl]
    use ldaps (ldap v2 ssl method). this also sets the default port to %s
 -2 [--ver2]
    use ldap protocol version 2
 -3 [--ver3]
    use ldap protocol version 3
    (default protocol version: 2)
 -w, --warning=DOUBLE
    Response time to result in warning status (seconds)
 -c, --critical=DOUBLE
    Response time to result in critical status (seconds)
 --repl-warning=INTEGER
    Replication time delta to result in warning status (seconds)
 --repl-critical=INTEGER
    Replication time delta to result in critical status (seconds)
 -t, --timeout=INTEGER
    Seconds before connection times out (default: 10)
 -v, --verbose
    Show details for command-line debugging (Nagios may truncate output)

METHODS

new()

create instance.

run()

run checks.

AUTHOR

Graham Barr <gbarr@pobox.com>

COPYRIGHT & LICENSE

Copyright 2007 Toru Yamaguchi, All Rights Reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.