Incorrect Status Reporting
Re: Incorrect Status Reporting
And you reloaded nagios after changing it? Because that should definitely change it.
Nicholas Scott
Former Nagios employee
Former Nagios employee
Re: Incorrect Status Reporting
I've reloaded and restarted it.nscott wrote:And you reloaded nagios after changing it? Because that should definitely change it.
Re: Incorrect Status Reporting
Ok, so I took out the -w and -c statements in both the service definition and the command itself and now the thing returns OK and is green in Nagios. Does that mean that it will return a critical for any state besides "3"?
Re: Incorrect Status Reporting
buee,
Does that mean that you left the -s or -r in? You need some kind of threshold for Nagios to determine whats good and whats bad, so if there are no threshold arguments it will always return OK.
Does that mean that you left the -s or -r in? You need some kind of threshold for Nagios to determine whats good and whats bad, so if there are no threshold arguments it will always return OK.
Nicholas Scott
Former Nagios employee
Former Nagios employee
Re: Incorrect Status Reporting
I left the -c in
So if it returns 2, it goes critical. What's I'd love is a warning at 5 and critical at 2. 5 is if it kicks to battery (lost AC power and should probably closely monitor the situation), 2 is "other" i.e. something is broken. 3 is normal operating mode. Before, I had the -w 5 and -c 2 and it worked. I can't seem to do that now.
Code: Select all
root@monitor:/etc/nagios3/conf.d# /usr/lib/nagios/plugins/check_snmp -H 10.0.4.2 -o .1.3.6.1.2.1.33.1.4.1.0 -C 1RC0MM -P 2c -c 3:3
SNMP OK - 3 | iso.3.6.1.2.1.33.1.4.1.0=3
root@monitor:/etc/nagios3/conf.d# /usr/lib/nagios/plugins/check_snmp -H 10.0.4.2 -o .1.3.6.1.2.1.33.1.4.1.0 -C 1RC0MM -P 2c -c 2:2
SNMP CRITICAL - *3* | iso.3.6.1.2.1.33.1.4.1.0=3Re: Incorrect Status Reporting
Unfortunately check_snmp doesn't support every single range on of the Nagios plugins ranges, however, maybe something like this might work?
check_snmp -H 10.0.4.2 -o .1.3.6.1.2.1.33.1.4.1.0 -C 1RC0MM -P 2c -c 4 -w 3:
This will yield a warning on anything LESS THAN (but not equal to) 3 and a critical on anything GREATER THAN (but not equal to) 4. I'm not sure what other number values your UPS can kick out, but if it pretty much just uses those three values, it should work.
check_snmp -H 10.0.4.2 -o .1.3.6.1.2.1.33.1.4.1.0 -C 1RC0MM -P 2c -c 4 -w 3:
This will yield a warning on anything LESS THAN (but not equal to) 3 and a critical on anything GREATER THAN (but not equal to) 4. I'm not sure what other number values your UPS can kick out, but if it pretty much just uses those three values, it should work.
Nicholas Scott
Former Nagios employee
Former Nagios employee