Tool

Monitor DirXML/IDM Driver States with Nagios

Author Info

22 January 2008 - 2:26pm
Submitted by: lhaeger

tool
Reads:

9732

Score:
0
0
 
Comments:

0

license: 
Free
download url: 
http://www.nagiosexchange.org/cgi-bin/page.cgi?g=Detailed%2F2039.html;d=1

Usage:
check_dxml_drvstate [-s hostname|ip-address] -u username, -p password -d driver-dn [-i] [--br]
[-tw warnsize -tc criticalsize [-tree treename]] [--hbw warntime --hbc criticaltime [--hbattr attr-name]]

Usage: check_dxml_drvstate [-h | --help]
Novell DirXML 1.1 and Identity Manager 2.x/3.x driver state detector plugin for Nagios

Version 1.4, 2008-01-22

  -s, --server     dirxml/idm server ip or hostname, e.g. 127.0.0.1 or myserver.mydomain.org.
                   Leave out this option to check drivers running on the same machine as nrpe
  -u, --username   account used to check driver state, ldap typed syntax, e.g. cn=admin,o=novell
  -p, --password   passwort in cleartext (good reason to use a restriced account :-)
  -d, --driver     driver to check, ldap typed syntax, cn=drv_test,cn=my_driverset,o=system
  -i, --invert     invert return codes to monitor inactive backup servers in a driverset.
                   A running driver will return STATE_CRITICAL (2), a stopped one STATE_OK (0)
      --tw         max TAO file size before STATE_WARNING (1) will be reported
      --tc         max TAO file size before STATE_CRITICAL (2) will be reported.
                   If neither --tw and --tc are set, TAO file size checking will be disabled
      --hbw        max time in seconds since last heartbeat before STATE_WARNING (1) will be reported
      --hbc        max time in seconds since last heartbeat before STATE_CRITICAL (2) will be reported.
                   If neither --hbw and --hbc are set, heartbeat checking will be disabled
                   Please note that a schema extension and a special event transform policy on the
                   driver are necessary to support heartbeat checking
      --hbattr     ldap name of the attr that stores the heartbeat timestamp if a non-default
                   schema extension is used
      --tree       treename of the driver to be checked. only needed with TAO file size monitoring
                   on edir 8.8 running multiple instances (developement feature - not tested!)
      --br         add 
 tags to output for better readability in HTML display
  -h, --help       help screen

Version history:

v1.0, 2006-04-10, initial release
v1.1, 2007-05-21, added support for IDM 3.5 and more detailed return messages
v1.2, 2007-08-01, added support for Edir 8.8
                  new command line option "-i" to invert return codes of running and
                  stopped drivers. This is meant to help monitoring usually inactive
                  backup servers associated to a driver set.
                  all changes in v1.2 based on enhancements by Rainer Brunold, many thanks!
v1.3, 2007-12-05, added TAO file size monitoring
                  username and driverdn must now be ldap typed (for TAO file size monitoring),
                  still works with nds dotted username/driverdn, but only without TAO size checks
                  take driver startup mode into consideration when driver is not running:
                      disabled -> STATE_OK,
                      manual   -> STATE_WARNING
                      auto     -> STATE_CRITICAL
                      added long command line options
v1.4, 2008-01-22, added heartbeat monitoring, requires a schema extension (aux class), driver
   heartbeat and a special policy on the driver
   new command line option --br to add html line breaks to text output 
   text output now shows warning/critical values for TAO file size and 
   heartbeat monitoring

Howto enable heartbeat monitoring:

  1. extend the tree schema from nagiosHelper.ldif
  2. add an event transform policy to monitored driver from Heartbeat4Nagios.xml
  3. enable publisher heartbeat as shown in publisher-heartbeat.xml
  4. restart driver
  5. add --hbc and/or --hbw parameters for the driver to nrpe.cfg
  6. (optional) add the --br option for better readability in HTML display
  7. wait for or reschedule next service check for the driver

Schema extension example:

ice -lice.log -SLDIF -fP:\ath\to\nagiosHelper.ldif -v -DLDAP -s10.0.0.111 -p389 -dcn=admin,o=novell -w********* -B

nrpe.cfg config example:

command[dxml_srv_pwnotify]=/path/to/check_dxml_drvstate -u cn=dxcmd,o=novell -p ***** --tw 500000 --tc 1000000 
--hbw 360 --hbc 900 --br -d cn=srv_pwnotify,cn=dirxml_drvset,o=novell

If you want to use a different attribute to store the heartbeat timestamp:

  1. edit the Heartbeat4Nagios policy to
    1. reflect the new attribute name
    2. make sure the timestamp is UTC and
    3. has LDAP format (e.g. 20080122123345Z = 2008-01-22 12:33:45 UTC)
    1. edit the line starting with "HBATTR_LDAPNAME=" in check_dxml_drvstate to match the new attribute name
      or
    2. add the command line option --hbattr to nrpe.cfg
  2. test extensively ;-)

download url: http://www.nagiosexchange.org/cgi-bin/page.cgi?g=Detailed%2F2039.html;d=1


Author Info

22 January 2008 - 2:26pm
Submitted by: lhaeger




User Comments

© 2009 Novell, Inc. All Rights Reserved.