The check_snmp Plugin
check_snmp v2.4git (monitoring-plugins 2.4git)
Copyright (c) 1999-2024 Monitoring Plugins Development Team
<devel@monitoring-plugins.org>
Check status of remote machines and obtain system information via SNMP
Usage:
check_snmp -H <ip_address> -o <OID> [-w warn_range] [-c crit_range]
[-C community] [-s string] [-r regex] [-R regexi] [-t timeout] [-e retries]
[-l label] [-u units] [-p port-number] [-d delimiter] [-D output-delimiter]
[-m miblist] [-P snmp version] [-N context] [-L seclevel] [-U secname]
[-a authproto] [-A authpasswd] [-x privproto] [-X privpasswd] [-4|6]
[-M multiplier]
Options:
-h, --help
Print detailed help screen
-V, --version
Print version information
--extra-opts=[section][@file]
Read options from an ini file. See
https://www.monitoring-plugins.org/doc/extra-opts.html
for usage and examples.
-H, --hostname=ADDRESS
Host name, IP Address, or unix socket (must be an absolute path)
-p, --port=INTEGER
Port number (default: 161)
-n, --next
Use SNMP GETNEXT instead of SNMP GET
-P, --protocol=[1|2c|3]
SNMP protocol version
-N, --context=CONTEXT
SNMPv3 context
-L, --seclevel=[noAuthNoPriv|authNoPriv|authPriv]
SNMPv3 securityLevel
-a, --authproto=[MD5|SHA]
SNMPv3 auth proto
-x, --privproto=[DES|AES]
SNMPv3 priv proto (default DES)
-C, --community=STRING
Optional community string for SNMP communication (default is "public")
-U, --secname=USERNAME
SNMPv3 username
-A, --authpasswd=PASSWORD
SNMPv3 authentication password
-X, --privpasswd=PASSWORD
SNMPv3 privacy password
--connection-prefix
Connection prefix, may be one of udp, udp6, tcp, unix, ipx, udp6, udpv6, udpipv6, tcp6, tcpv6, tcpipv6, tls, dtls - default is "udp"
-o, --oid=OID(s)
Object identifier(s) or SNMP variables whose value you wish to query
-m, --miblist=STRING
List of MIBS to be loaded (default = none if using numeric OIDs or 'ALL'
for symbolic OIDs.)
Any data on the right hand side of the delimiter is considered
to be the data that should be used in the evaluation.
-z, --nulloid=#
If the check returns a 0 length string or NULL value
This option allows you to choose what status you want it to exit
Excluding this option renders the default exit of 3(STATE_UNKNOWN)
0 = OK
1 = WARNING
2 = CRITICAL
3 = UNKNOWN
-w, --warning=THRESHOLD(s)
Warning threshold range(s)
-c, --critical=THRESHOLD(s)
Critical threshold range(s)
--offset=OFFSET
Add/subtract the specified OFFSET to numeric sensor data
-s, --string=STRING
Return OK state (for that OID) if STRING is an exact match
-r, --ereg=REGEX
Return OK state (for that OID) if extended regular expression REGEX matches
-R, --eregi=REGEX
Return OK state (for that OID) if case-insensitive extended REGEX matches
--invert-search
Invert search result (CRITICAL if found)
-l, --label=STRING
Prefix label for output from plugin
-u, --units=STRING
Units label(s) for output data (e.g., 'sec.').
-M, --multiplier=FLOAT
Multiplies current value, 0 < n < 1 works as divider, defaults to 1
--output-format=OUTPUT_FORMAT
Select output format. Valid values: "multi-line", "mp-test-json"
-t, --timeout=INTEGER
Seconds before connection times out (default: 10)
NOTE the final timeout value is calculated using this formula: timeout_interval * retries + 5
-e, --retries=INTEGER
Number of retries to be used in the requests, default: 5
-O, --perf-oids
Label performance data with OIDs instead of --label's
--ignore-mib-parsing-errors
Do to not print errors encountered when parsing MIB files
-v, --verbose
Show details for command-line debugging (output may be truncated by
the monitoring system)
This plugin relies (links against) on the NET-SNMP libraries.
if you don't have the libraries installed, you will need to download them from
http://net-snmp.sourceforge.net before you can use this plugin.
Notes:
- Multiple OIDs (and labels) may be indicated by a comma or space-delimited
list (lists with internal spaces must be quoted).
- See:
https://www.monitoring-plugins.org/doc/guidelines.html#THRESHOLDFORMAT
for THRESHOLD format and examples.
- When checking multiple OIDs, separate ranges by commas like '-w 1:10,1:,:20'
- Note that only one string and one regex may be checked at present
- All evaluation methods other than PR, STR, and SUBSTR expect that the value
returned from the SNMP query is an unsigned integer.
Send email to help@monitoring-plugins.org if you have questions regarding
use of this software. To submit patches or suggest improvements, send email
to devel@monitoring-plugins.org