$ ./check_iferror.py -h
usage: check_iferror.py [-h] -H HOST [-C COMMUNITY] [-o OID] [-O IFOID]
[-S IFUPSTATE] [--warnifdown] [--okifdown]
[-i INTERFACE] [--preset PRESET] [-P PORT]
[-w WARNING] [-c CRITICAL] [-t TIME] [-s SCRATCH] [-p]
[-d] [-T] [-V]
Nagios plugin, interned to check error count OIDs via SNMP. A non-zero exit
code is generated, if the counter delta exceeds the waring / critical values
inthe evaluation time period. Additionally the plugin checks for the interface
state if arguments --ifoid and --ifupsate are supplied. The plugin will exit
critical/warning if the the interface is down.Recommendation: Use longer
check_intervals with a low recheck count.
optional arguments:
-h, --help show this help message and exit
-H HOST, --host HOST SNMP Agent IP / hostname
-C COMMUNITY, --community COMMUNITY
Read community name (default: "public")
-o OID, --oid OID Error count base OID
-O IFOID, --ifoid IFOID
Interface base OID
-S IFUPSTATE, --ifupstate IFUPSTATE
Expected interface operational state (integer)
--warnifdown Exit with warning instead of critical if interface is
down
--okifdown Exit with ok instead of critical if interface is down
-i INTERFACE, --interface INTERFACE
Interface number. Appended to the base OID
--preset PRESET Use OID preset
-P PORT, --port PORT SNMP port
-w WARNING, --warning WARNING
Warning threshold (Count)
-c CRITICAL, --critical CRITICAL
Critical threshold (Count)
-t TIME, --time TIME Evaluation time period. (in hours, default 24h)
-s SCRATCH, --scratch SCRATCH
Scratch / temp base directory. Must exist. (default:
/tmp)
-p, --perfdata Print performance data, (default: off)
-d, --debug Verbose mode
-T, --test Run test case; needs WAN connection
-V, --version show program's version number and exit
Currently only SNMPv1 and plain OIDs are supported. Needs python > 2.6, pysnmp
> 4.2.5, python-argparseThis program is free software: you can redistribute it
and/or modify it under the terms of the GNU General Public License as
published by the Free Software Foundation, either version 3 of the License, or
at your option) any later version. Author: Daniel Helgenberger