Take the 2-minute tour ×
Network Engineering Stack Exchange is a question and answer site for network engineers. It's 100% free, no registration required.

My goal is to write a service check that pulls the status of a Cisco track list that is performing a Boolean OR. I have a screen scraper in place currently, but that is really not ideal in terms of scaling this type of service check.

The track object below simply pulls out the tracked static route if object 10 and object 20 are both unreachable, allowing a BGP learned default route to be installed, that is otherwise in RIB-failure status.

Configuration Example:

!
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.10.10.10
ip sla schedule 1 life forever start-time now
ip sla 2
 icmp-echo 4.2.2.2 source-ip 10.10.10.10
ip sla schedule 2 life forever start-time now

ip route 0.0.0.0 0.0.0.0 10.10.10.1 track 30

It would be ideal to pull either the number of changes or the Boolean OR status (up or down) from an OID.

HOSTNAME#show track 30
Track 30
  List boolean or
  Boolean OR is Up
    14716 changes, last change 02:18:47
    object 10 Up
    object 20 Up
  Tracked by:
    STATIC-IP-ROUTINGTrack-list 0

I've been digging through the Google machine, forums and the Cisco SNMP Object Navigator to no avail.

share|improve this question

1 Answer 1

up vote 6 down vote accepted

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.