Page 1 of 1

Quick SNMP Question

Posted: Tue Jan 12, 2016 1:45 pm
by peter.zanetti
I have successfully set up a service to check snmp on a specific OID for a character match looking for a return of "Yes". The service is working somewhat as planned, the only issue I am having is that when the service doesn't get a match it is returning as critical. Is there a way to make this return as a warning instead?

Code: Select all

$USER1$/check_snmp -H $HOSTADDRESS$  -o .1.3.6.1.4.1.1429.2.2.4.5.4.1.5.1 -w public -P 1 -l "Service" -r "Yes"

Re: Quick SNMP Question

Posted: Tue Jan 12, 2016 1:53 pm
by hsmith
You'll want to write a wrapper script, and have it exit with a 1 instead of a 2.

Something like:

If something = somethinggood exit 0
if something = somethingbad exit 1

Right now it's exiting with a 2 when it's not finding what it's looking for. 2 will generate a critical message.

Does this make sense?