Home Directory Plugins Others check_snmp_boundaries

Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

Directory Tree

check_snmp_boundaries

Rating
0 votes
Favoured:
0
Current Version
1.0
Last Release Date
2013-08-08
Compatible With
  • Nagios 3.x
Owner
Hits
31776
Network Monitoring Software - Download Nagios XI
Log Management Software - Nagios Log Server - Download
Netflow Analysis Software - Nagios Network Analyzer - Download
Plugin that checks that a snmp-obtained value stands between two specified boundaries.

Currently working with SNMP V1 and v2c.


Depends: Perl, snmpget, Nagios utils, getopt::Long

I use this plugin to check a lot a different things like :
Monitor Number of up tunnel on firewall
Compare the current value of an OID to a fixed value
Verify that a ressource does not fall above or below boundaries

Example
perl check_value_between.pl -v 2c -H 192.168.100.251 -C int -o .1.3.6.1.4.1.9.9.109.1.1.1.1.6 --state=critical --min 1 --max 14

Mail me, or comment for any bugs or remarks...
Usage : check_snmp_boundaries.pl [-h] -v -H -C -o --state --min --max


Return OK if :
min <= SNMP-obtained value <= max

-h, --help
print this help message
-H, --hostname=HOST
name or IP address of host to check
-C, --community=COMMUNITY NAME
community name for the host's SNMP agent
-v, --version=1|2c
SNMP community strings. Only version 1 and 2c are currently supported
-o
SNMP OID
--min
low boundary
--max
high boundary
--state=warning|unknown|critical - case insensitive (default critical)
Prefered return state if the checked value is out of boundaries
If state parameter is not entered correctly, it returns to the default value


Note that some cases are Hard coded and will not use state value.
Returns OK if min <= value <=max
Returns OK if help was called , because help should never be called in actual check
Returns CRITICAL if required aguments are not present
Returns UNKNOWN if min > max
Returns UNKNOWN if min or max does not match the pattern, ergo is not recognized as numbers
Returns UNKNOWN if anything goes wrong with snmp polling
Return "state" if the value is out of boundaries