Page 2 of 2
Re: Some Cisco OIDs Not Working on Router
Posted: Wed Nov 12, 2014 2:14 pm
by perric
I appended the status (.43 or .1314) to the OID and it seems to work.
check_snmp -C cXXXXX -H 192.168.83.75 -o 1.3.6.1.2.1.10.20.1.3.4.1.2.1314
The snmp walk showed two states, but there should be three options.
SNMP Results
ISDN-MIB::isdnLapdOperStatus.43 = INTEGER: inactive(1)
ISDN-MIB::isdnLapdOperStatus.1314 = INTEGER: l2Active(3)
Options1 : inactive
2 : l1Active
3 : l2Active
How can I access option #2 and then have it marked as a WARNING (vs DOWN)?
David
Re: Some Cisco OIDs Not Working on Router
Posted: Wed Nov 12, 2014 5:28 pm
by abrist
Well, you may be able to control that with thresholds with check_snmp. Set the warning threshold to warn when the value is 1.
What do you want the other devices states (0 and 2) to do?
Re: Some Cisco OIDs Not Working on Router
Posted: Thu Nov 13, 2014 10:19 am
by perric
Thanks for your reply. I would like this:
1 : inactive ----> DOWN
2 : l1Active ----> WARNING
3 : l2Active ----> UP
But here's my confusion with these OIDs. I expected the OID of 1.3.6.1.2.1.10.20.1.3.4.1.2 to report back with a status of 1, 2 or 3 as documented by Cisco, but instead I can only test by adding the suffix 1314, which will test where L2Active (via 1.3.6.1.2.1.10.20.1.3.4.1.2.
1314) is true or false.
http://tools.cisco.com/Support/SNMP/do/ ... OperStatus
Above is the link to the Cisco document on this OID. I am wondering if Nagios is finding this via another MIB that I added. Is there a way to specify a specific MIB with the check_snmp command?
David
Re: Some Cisco OIDs Not Working on Router
Posted: Thu Nov 13, 2014 2:39 pm
by sreinhardt
It actually has nothing to do with your nagios mibs. This is entirely how the device is responding to those oids. If you were using shortnames, like ifOperstatus.1314 it would be very similar, but would definitely depend on your mibs, as check_snmp would have to interpret the name to oid. Just like for dns with using an IP directly avoids a dns lookup and possibly incorrect resolution.
Without a fuller walk of your device I am just speculating, but it seems that your additional suffix is the specific port, vlan, or otherwise identifier for whichever interface you are querying. More than likely if you did a wider snmpwalk on an oid like 1.3.6.1.2.1.10.20.1.3 you would see several suffixes increment for different types of data, and the final suffix to rotate between a consistent set of the same values, as those are the unique ID for that particular object relative to how snmp loaded this time. Maybe something like:
1.3.6.1.2.1.10.20.1.3.4.1.1.183
1.3.6.1.2.1.10.20.1.3.4.1.1.1213
1.3.6.1.2.1.10.20.1.3.4.1.1.1314
1.3.6.1.2.1.10.20.1.3.4.1.2.183
1.3.6.1.2.1.10.20.1.3.4.1.2.1213
1.3.6.1.2.1.10.20.1.3.4.1.2.1314
1.3.6.1.2.1.10.20.1.3.4.1.3.183
1.3.6.1.2.1.10.20.1.3.4.1.3.1213
1.3.6.1.2.1.10.20.1.3.4.1.3.1314
Re: Some Cisco OIDs Not Working on Router
Posted: Thu Nov 13, 2014 4:11 pm
by perric
Got it. You are correct. These numbers are ports or interfaces and each router (via snmpwalk) is giving different values. I am seeing at least two states for each of the ports that I query via SNMP, so it seems to be working.
How do I tell Nagios that 3 is "UP", 2 is "WARNING" and that 1 = "DOWN"?
David
Re: Some Cisco OIDs Not Working on Router
Posted: Thu Nov 13, 2014 5:52 pm
by sreinhardt
Glad that made sense, snmp especially switches and routers, seems to be pretty tricky to pick up.
Fair warning, despite being a plugin developer, I always get this format wrong...

According to the plugin guidelines here:
https://nagios-plugins.org/doc/guidelin ... HOLDFORMAT
You want to use something like: -w 2: -c 1:
This should set that warning is less than 2 and critical is less than 1. This way 3, which is always greater than both, will properly be detected as OK! A side effect of this, is that if 0 is ever received it is also critical.
Re: Some Cisco OIDs Not Working on Router
Posted: Fri Nov 14, 2014 9:45 am
by perric
Appreciate all of the help, Spenser. This worked and solved my issue.
David
Re: Some Cisco OIDs Not Working on Router
Posted: Fri Nov 14, 2014 10:28 am
by tmcdonald
Great! I'll be closing this thread now, but feel free to open another if you need anything in the future.