Quick SNMP Question

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
peter.zanetti
Posts: 90
Joined: Wed Oct 01, 2014 8:34 am

Quick SNMP Question

Post 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"
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Quick SNMP Question

Post 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?
Former Nagios Employee.
me.
Locked