/check_snmp_extend

Nagios plugin to check snmp values based on exec/extend name

Primary LanguagePython

=================
check_snmp_extend
=================

Nagios plugin to check output of exec of extend scripts in snmp 
by name.


Usage::

    Usage: check_snmp_extend.py [options]

    Options:
      --version             show program's version number and exit
      -h, --help            show this help message and exit
      -d, --debug           Enable debug output
      -l, --output-longoutput
                            Long output format
      -p, --output-perfdata
                            Output performance data
      -s, --output-complete-summary
                            Output complete summary
      -v SNMP_VERSION, --snmp-version=SNMP_VERSION
                            SNMP Version
      -c COMMUNITY, --community=COMMUNITY
                            Community string [default: public]
      -H HOST, --host=HOST  Host [default: localhost]
      -e EXTEND_NAME, --extend-name=EXTEND_NAME
                            SNMP extend name [default: ALL]
      -t TIMEOUT, --timeout=TIMEOUT
                            Timeout [default: 10]
      -u SNMP_USER, --user=SNMP_USER
                            SNMP username (v3 only)
      -l SNMP_SECLEVEL, --seclevel=SNMP_SECLEVEL
                            SNMP Seclevel (noAuthNoPriv|authNoPriv|authPriv, v3
                            only)
      -a SNMP_AUTHPROTO, --authproto=SNMP_AUTHPROTO
                            SNMP Authentication protocol (MD5 or SHA, v3 only)
      -A SNMP_AUTHPASS, --authpass=SNMP_AUTHPASS
                            SNMP Authentication password (v3 only)
      -x SNMP_PRIVPROTO, --privproto=SNMP_PRIVPROTO
                            SNMP privacy protocol (DES or AES, v3 only)
      -X SNMP_PRIVPASS, --privpass=SNMP_PRIVPASS
                            SNMP privacy password (v3 only)

        
        HOW TO ADD A SNMP EXEC (EXTEND) :
        edit /etc/snmp/snmpd.conf
        add a line like this :
        
        extend yesterday /bin/date --date=yesterday
        (This should output the current date -1 day)
        
        Then restart your snmpd daemon (service snmpd restart)
        
        Call this plugin like this to check this snmp extend :
        %prog --host localhost --snmp-version 2c --community public --extend-name yesterday
        This should output :
        Mon Mar 28 11:12:24 CEST 2011
        (well, you won't get this specific date, but output will be similar...)