Incorrect Status Reporting

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
User avatar
nscott
Posts: 1040
Joined: Wed May 11, 2011 8:54 am

Re: Incorrect Status Reporting

Post by nscott »

And you reloaded nagios after changing it? Because that should definitely change it.
Nicholas Scott
Former Nagios employee
buee
Posts: 26
Joined: Mon May 21, 2012 10:24 am

Re: Incorrect Status Reporting

Post by buee »

nscott wrote:And you reloaded nagios after changing it? Because that should definitely change it.
I've reloaded and restarted it.
buee
Posts: 26
Joined: Mon May 21, 2012 10:24 am

Re: Incorrect Status Reporting

Post by buee »

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"?
User avatar
nscott
Posts: 1040
Joined: Wed May 11, 2011 8:54 am

Re: Incorrect Status Reporting

Post by nscott »

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.
Nicholas Scott
Former Nagios employee
buee
Posts: 26
Joined: Mon May 21, 2012 10:24 am

Re: Incorrect Status Reporting

Post by buee »

I left the -c in

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=3
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.
User avatar
nscott
Posts: 1040
Joined: Wed May 11, 2011 8:54 am

Re: Incorrect Status Reporting

Post by nscott »

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.
Nicholas Scott
Former Nagios employee
Locked