Switchport reports as critical even though status is up

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
BDT
Posts: 3
Joined: Wed Jun 26, 2019 1:37 pm

Switchport reports as critical even though status is up

Post 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
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Switchport reports as critical even though status is up

Post 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)
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
BDT
Posts: 3
Joined: Wed Jun 26, 2019 1:37 pm

Re: Switchport reports as critical even though status is up

Post by BDT »

I was pulling my hair out over that. Thank you!
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Switchport reports as critical even though status is up

Post by scottwilkerson »

BDT wrote:I was pulling my hair out over that. Thank you!
Glad to hear it is resolved!

Locking thread
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked