Different results from 'check_snmp' running on different servers

Thomas Guyot-Sionnest dermoth at aei.ca
Thu May 3 15:14:49 CEST 2007


On 03/05/07 06:06 AM, Richard Luys-Nagios User wrote:
> Hi list,
> 
> I have an odd problem, hope someone can shed some light on this.
> 
> I'm busy installing a new Nagios server. The old one is running Nagios  
> 1.2, and the new one is running 2.9. The used nagios plugins on the old  
> server is version 1.3.1, on the new server it is: 1.4.8.
> 
> I issue the following check from the old server (the 1.2):
> 
> oldNagios:/usr/local/nagios/libexec # ./check_snmp -H switch1 -o  
> ciscoEnvMonTemperatureStatusDescr.1005
> SNMP OK - Switch#1, Sensor#1, Status is GREEN
> 
> The exitcode of this check is 0 (OK)
> 
> newNagios:/usr/local/nagios/libexec # ./check_snmp -H switch1 -o  
> ciscoEnvMonTemperatureStatusDescr.1005
> SNMP WARNING - Switch#1, Sensor#1, Status is GREEN
> 
> Now the exitcode is 1 (WARNING) !!!
> 
> Then I issue this check from the new server (the 2.9 installation), but  
> with the old plugin (1.3.1):
> newNagios:/usr/local/nagios/libexec.131 # ./check_snmp -H switch1 -o  
> ciscoEnvMonTemperatureStatusDescr.1005
> SNMP WARNING - Switch#1, Sensor#1, Status is GREEN
> 
> And again: the exitcode is 1 (WARNING)

You're checking is a string so normally it always return OK. If it
returns a non-ok status it's most likely because snmpget returned
something on STDERR. use the -v switch to see which command is being
run, and then you can run it yourself to see what's going on (usually
it's MIB parsing errors like illegal characters - there's multiple way
to fix these issues)

If you want to alert based on the status returned you should rather use
a OID that returns a numeric value like these ones:

ciscoEnvMonTemperatureStatusValue
ciscoEnvMonTemperatureState

Thomas

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
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