Cisco IP SLA snmp notifications

cisconetworking

I have a ruleset on a Cisco IOS router similar to the one below. All works great with regards to the delay on the track however the SNMP bits trigger in the event of a single ICMP failure and not in the event of a track timer completing and finding a changed state on the track and thus changing the route.

I can see the track timer is working as expected: "Reachability is Up, delayed Down (12 secs remaining)"

How should it be configured to trigger on a failure which causes the floating route to activate?

track 1 rtr 123 reachability
 delay down 20 up 60
!
ip route 0.0.0.0 0.0.0.0 1.2.3.4 track 1
ip route 0.0.0.0 0.0.0.0 4.3.2.1 254 name ADSL_Backup
!
ip sla 123
 icmp-echo 3.4.5.6 source-interface FastEthernet0/0
 timeout 2000
 frequency 10
ip sla schedule 123 life forever start-time now
!
logging trap notifications
!
event manager applet IP-SLA-123-TIMEOUT
 event snmp oid 1.3.6.1.4.1.9.9.42.1.2.9.1.6.123 get-type exact entry-op eq entry-val 1 exit-op eq exit-val 2 poll-interval 5
 action 1.0 mail server "7.6.5.4" to "me@mail.com" from "monitor@mail.local" subject "IP SLA 123 Timeout" body "Timeout on the primary line"
event manager applet IP-SLA-123-OK
 event snmp oid 1.3.6.1.4.1.9.9.42.1.2.9.1.6.123 get-type exact entry-op eq entry-val 2 exit-op eq exit-val 1 poll-interval 5
 action 1.0 mail server "7.6.5.4" to "me@mail.com" from "monitor@mail.local" subject "IP SLA 123 Restored" body "Primary line restored"

Best Answer

Your are triggering SNMP alert using the Cisco EEM based on the IP SLA feature, not the track object.

Have a look at this documentation instead: http://www.cisco.com/en/US/docs/ios/12_4t/12_4t2/ht_eem.html#wp1058361