Page 1 of 1

Switchport reports as critical even though status is up

Posted: Tue Aug 27, 2019 7:13 pm
by BDT
I've been running Nagios Core for a few months now and have monitoring setup for several identical switches in different buildings on the same network. I had a problem with one of the monitored ports failing for building 20 and was able to recover by moving the uplink to another port on the same switch. I made a separate definition for this device as to monitor the new port while excluding the old, failed port.

The port does show in the monitored services but is always in a critical state with the exception being if I manually send a passive check. This causes the service to go green until the next active check comes around at which point it reverts to critical. I'm using SNMP queries to monitor the ports for all devices and copied and pasted the check command into the passive check box so (so I'm sure it's not a typo.)

Image

I'm running the check command check_snmp!-C public -o ifOperStatus.22 -r l -m RFC1213-MIB for each port with the 22 changed to reflect the port number monitored. I've attached my relevant configurations below. Please help!
templates.cfg
(12.38 KiB) Downloaded 127 times
switch.cfg
(12.2 KiB) Downloaded 139 times

Re: Switchport reports as critical even though status is up

Posted: Wed Aug 28, 2019 1:54 pm
by scottwilkerson
You said you are using

Code: Select all

check_snmp!-C public -o ifOperStatus.22 -r l -m RFC1213-MIB
but it should be

Code: Select all

check_snmp!-C public -o ifOperStatus.22 -r 1 -m RFC1213-MIB
That should be a 1 (one) after the -r NOT an l (elle)

Re: Switchport reports as critical even though status is up

Posted: Thu Aug 29, 2019 6:18 pm
by BDT
I was pulling my hair out over that. Thank you!

Re: Switchport reports as critical even though status is up

Posted: Fri Aug 30, 2019 6:58 am
by scottwilkerson
BDT wrote:I was pulling my hair out over that. Thank you!
Glad to hear it is resolved!

Locking thread