survivor: Snmp Check Module

SURVIVOR: `snmp` Check Module
About `snmp` Dependencies Arguments Description Examples
About `snmp`
basics |
Module Type | Scheduler | Remote
check | Yes | Yes
syntax |
         module snmp {
           [community <string>]
           oid <string>
           [warnmatch <relation>]
           [probmatch <relation>]
           [match <relation>]
           [warncount <relation>]
           [probcount <relation>]
           [mib <file>]
           [snmpversion (1 | 2 | 2c | 3)]
           [snmptimeout <number>]
         }
### Dependencies Perl Modules `SNMP` ### Arguments
Name | Type | Value
community | optional string, default is 'public' | Community name with read-access.
oid | string | SNMP OID to use as search filter. OID may be either numerical or named. If it is named, it may be necessary to use the `mib` argument to provide the name of a mib file containing the translations. Using numerical OIDs is preferred since named OID resolution is not always perfect.
warnmatch | optional relation | Trigger a warning if this relation matches the response.
probmatch | optional relation | Trigger a problem if this relation matches the response.
match | optional relation | If warncount or probcount is specified, use this relation to determine if a line from the response is considered matching.
warncount | optional relation | If match is specified, trigger a warning if this relation matches the count of lines matching match.
warnprob | optional relation | If match is specified, trigger a problem if this relation matches the count of lines matching match.
mib | optional file | MIB file to load in order to find special OID definitions.
snmpversion | optional string, one of '1', '2','2c', or '3', default is '1' | SNMP protocol version to use.
snmptimeout | optional number between 1 and infinity, default is '5' | SNMP query timeout, in seconds. Note that multiple queries may be issued within one check, so this should not be the same as the module timeout.
1. At least one of match, warnmatch or probmatch must be specified. ### Description The `snmp` module uses the Perl `SNMP` module to determine if the host being checked has status in line with the specified query. If only `warnmatch` and `probmatch` are specified, all lines returned at or under `oid` must match the `warnmatch`/`probmatch` specification. If no line matching `oid` is found, the module is considered misconfigured. ### Examples To warn if the value at oid .iso.3.6.1.4.1.789.1.2.1.3 (accessed at community mycommunity) is greater than 60 or generate a problem if it is greater than 90:
            module snmp {
              community mycommunity
              oid .iso.3.6.1.4.1.789.1.2.1.3
              warnmatch gt[60]
              probmatch gt[90]
            }
2. As above, but using the textual oid as defined in `/etc/netapp.mib`:
            module snmp {
              community mycommunity
              oid .iso.org.dod.internet.private.enterprises.netapp.netapp1.sysStat.cpu.cpuBusyTimePerCent
              warnmatch gt[60]
              probmatch gt[90]
              mib /etc/netapp.mib
            }
3. To generate a warning if less than 2 hot spares are present on a JetStor device or a problem if less than 1 hot spare is present:
            module snmp {
              community mycommunity
              oid .iso.3.6.1.4.1.14752.1.2.3.1.1.9
              match reg[Hot Spare]
              warncount lt[2]
              probcount lt[1]
            }
$Date: 2007/02/11 02:08:47 $ $Revision: 0.11 $ | keywords community match mib oid probcount probmatch snmptimeout snmpversion warncount warnmatch