check_snmp: Translate the return value via a MIB?

James Michael Keller jmkeller at houseofzen.org
Wed Oct 24 22:13:29 CEST 2007


I am using check_snmp to read status of some UPS units, but I would like 
to get the return value translated via the MIB, not just the OID:

Running the check at the command line:

nagios:~# /usr/lib/nagios/plugins/check_snmp -H XX.XX.XX.XX -C YYYYYYYY 
-o .1.3.6.1.4.1.318.1.1.1.4.1.1.0 -c 1:2 4:8 11:12  -l 'UPS Mode' -m 
PowerNet-MIB
UPS Mode CRITICAL - *4* | PowerNet-MIB::upsBasicOutputStatus.0=4 

So the e-mail just says 'UPS Mode CRITICAL - *4*

Running snmpwalk:

nagios:~# snmpwalk -m PowerNet-MIB -Cc -v 2c -c YYYYYYY  XX.XX.XX.XX  
.1.3.6.1.4.1.318.1.1.1.4.1.1.0
PowerNet-MIB::upsBasicOutputStatus.0 = INTEGER: onSmartBoost(4)
nagios:~#

What I would like to have is the alert say 'UPS Mode CRITICAL - 
onSmartBoost' or *4* (onSmartBoost) , etc.    Something more descriptive.

Now is this a case for a wrapper or a customized notify command for this 
alert?  Or is there a way to do this with check_snmp in 2.6.x?

Thanks in advance.



-- 
James Michael Keller


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list