I don't believe there is a way to directly poll the results of the OR
via SNMP, but you can certainly poll for the IP SLA results and calculate it yourself.
Using the CISCO-RTTMON-MIB (1.3.6.1.4.1.9.9.42), you can check the timeout value of your reachability checks, take the true/false value it returns and do the OR
in whatever scripting language you're using to poll via SNMP.
For example, I setup a similar test to yours above:
track 10 ip sla 1 reachability
!
track 20 ip sla 2 reachability
!
track 30 list boolean or
object 10
object 20
!
ip sla 1
icmp-echo 8.8.8.8 source-ip 10.129.10.62
ip sla schedule 1 life forever start-time now
ip sla 2
icmp-echo 4.2.2.2 source-ip 10.129.10.62
ip sla schedule 2 life forever start-time now
!
ip route 10.171.20.0 255.255.255.252 10.129.10.61 track 30
Then, I verified the output in IOS:
R-VOIPLAB#show track 30
Track 30
List boolean or
Boolean OR is Up
2 changes, last change 00:01:21
object 10 Up
object 20 Up
Next, with the IP SLA tracking in place, I installed the CISCO-RTTMON-MIB on my monitoring server, and walked the value of rttMonCtrlOperTimeoutOccurred (1.3.6.1.4.1.9.9.42.1.2.9.1.6) for it's True/False output.
The key item to note is that since we are polling whether a timeout occurred or not, that False means that the destination is reachable, and True means that it is not reachable and a timeout has occurred.
snmpwalk -v3 -a SHA -A SNMP-AUTH-PASS -l authNoPriv -u SNMPUSER r-voiplab rttMonCtrlOperTimeoutOccurred
CISCO-RTTMON-MIB::rttMonCtrlOperTimeoutOccurred.1 = INTEGER: false(2)
CISCO-RTTMON-MIB::rttMonCtrlOperTimeoutOccurred.2 = INTEGER: false(2)
Finally, I blackholed traffic to 8.8.8.8 from that box, and checked the Track results in IOS again:
R-VOIPLAB(config)#ip route 8.8.8.8 255.255.255.255 null 0
R-VOIPLAB(config)#end
R-VOIPLAB#show track 30
Track 30
List boolean or
Boolean OR is Up
2 changes, last change 00:21:18
object 10 Down
object 20 Up
Tracked by:
STATIC-IP-ROUTING 0
Now that we have one of the test objects in a Down
state, let us see the results of polling rttMonCtrlOperTimeoutOccurred again:
snmpwalk -v3 -a SHA -A SNMP-AUTH-PASS -l authNoPriv -u SNMPUSER r-voiplab rttMonCtrlOperTimeoutOccurred
CISCO-RTTMON-MIB::rttMonCtrlOperTimeoutOccurred.1 = INTEGER: true(1)
CISCO-RTTMON-MIB::rttMonCtrlOperTimeoutOccurred.2 = INTEGER: false(2)
Now, as I stated above, you would just have to poll those values and use them however you need to in your script.
The answer you were given for IPv4 uses OIDs that existed before RFC4293 and RFC4292. Cisco has updated its MIBs to use protocol-independent objects in the IP-MIB and IP-FORWARD-MIB.
Source: http://www.cisco.com/web/about/security/intelligence/ipv6_mib.html
To cut a long story short, instead of using the node 1.3.6.1.2.1.4.20
try using the node 1.3.6.1.2.1.4.34
and its subnodes.
Cisco's SNMP Object Navigator is useful for visualising the data structure of the MIB.
OID Interface Address
Best Answer
Assuming this is the MIB that you're referring to, I see the following table:
With each row in the table being:
Presumably
tlUpsOutputCircuitLoadCurrent
would be what you want, and represents the amps in tenths?EDIT: Try telling Net-SNMP where to load the MIBs from when you run
snmpwalk
. Assuming you've saved those MIB files to/home/ethan/.snmp/mibs
you would do the following:If that still returns an error, the next step would be to just run a bulkwalk on the unit to see what OIDs are available, as the SNMP agent on the device may not export everything that's available in TRIPPLITE-MIB.