ifOperStatus returns 2, but Nagios says OK

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.
Locked
lonestarz06
Posts: 1
Joined: Mon Nov 29, 2010 11:54 pm

ifOperStatus returns 2, but Nagios says OK

Post by lonestarz06 »

So, I just turned up my 5th Nagios server and to date, everything has gone smooth. I turned up a new one tonight and I'm having a bit of a problem with Nagios reflecting the correct state. Here is an example from the switch.cfg:

Code: Select all

define service{
	use			generic-service	; Inherit values from a template
	host_name		cisco-sg300
	service_description	Port 10 Link Status
	check_command		check_snmp!-C public -o ifOperStatus.58 -r 1 -m RFC1213-MIB
	}
I have the correct interface index values and everything as the returned value matches the state of the port. IOW, everything that is down returns a value of 2 and everything that is up returns a value of 1. So, nothing wrong with the actual SNMP transaction. However, Nagios still says OK.

Current Status: OK (for 0d 0h 20m 4s)
Status Information: SNMP OK - 2
Performance Data: RFC1213-MIB::ifOperStatus.50=2
Current Attempt: 1/3 (HARD state)
Last Check Time: 11-29-2010 22:48:33
Check Type: ACTIVE
Check Latency / Duration: 0.108 / 0.022 seconds
Next Scheduled Check: 11-29-2010 22:58:33
Last State Change: 11-29-2010 22:38:33
Last Notification: N/A (notification 0)
Is This Service Flapping? NO (0.00% state change)
In Scheduled Downtime? NO
Last Update: 11-29-2010 22:58:30 ( 0d 0h 0m 7s ago)

I'm using Nagios plugins v1.4.15 and I have to believe this is a problem with check_snmp, but I'm not sure. There were no compile errors whatsoever. Thoughts anyone?
Locked