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
Some Cisco OIDs Not Working on Router
Re: Some Cisco OIDs Not Working on Router
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?
What do you want the other devices states (0 and 2) to do?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: Some Cisco OIDs Not Working on Router
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
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
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: Some Cisco OIDs Not Working on Router
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
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
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Re: Some Cisco OIDs Not Working on Router
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
How do I tell Nagios that 3 is "UP", 2 is "WARNING" and that 1 = "DOWN"?
David
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: Some Cisco OIDs Not Working on Router
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.
Fair warning, despite being a plugin developer, I always get this format wrong...
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.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Re: Some Cisco OIDs Not Working on Router
Appreciate all of the help, Spenser. This worked and solved my issue.
David
David
Re: Some Cisco OIDs Not Working on Router
Great! I'll be closing this thread now, but feel free to open another if you need anything in the future.
Former Nagios employee