Page 1 of 1

No performance data from check_snmp

Posted: Tue Apr 12, 2016 5:27 pm
by ljblom
We are using a ControlByWeb X300 web relay at one of our sites. We have written a service to retrieve the temperature vi SNMP:

$USER1$/check_snmp -H $HOSTADDRESS$ -o .1.3.6.1.4.1.30586.10.11.0 $ARG1$

The command is working, however it's only returning a string:

COMMAND: /usr/local/nagios/libexec/check_snmp -H 10.x.x.x -o .1.3.6.1.4.1.30586.10.11.0 -C public
OUTPUT: SNMP OK - "0" |

The output is a string, so we are not logging any performance data for this currently. How can we modify this command/service to log performance data?

Thank you for your help.

Re: No performance data from check_snmp

Posted: Wed Apr 13, 2016 8:18 am
by scottwilkerson
Does this OID return a string value or a integer/counter/gauge?

can you run

Code: Select all

snmpget 10.x.x.x v 2c -c public .1.3.6.1.4.1.30586.10.11.0
and post the response

Re: No performance data from check_snmp

Posted: Wed Apr 13, 2016 1:11 pm
by ljblom
Thank you for the reply. Actually, found a very simple solution. I hadn't set warning or critical levels. Just adding the warning/critical thresholds changed the output from a string to integer, enabling performance data to be logged. I don't know why, but I'll take it:)

Thank you for your quick response none the less.

Re: No performance data from check_snmp

Posted: Wed Apr 13, 2016 1:57 pm
by bwallace
Thanks for the update and glad to hear you found a solution. Closing thread now....