To use EEM Applet with IP SLA to track and make required modifications.
Customer installed a new fiber between the two 3750 switches (R2, R3) and wants traffic from a certain server in site one, going to and coming from site 2, to go over the fiber. (R1 - R4 should go over fiber) as opposed to the MPLS cloud.
However, he has FIDDI converters in between the two switches to terminate the fiber, and so if the link between the two FIDDI converters goes down, the switches ports will be up/up, and line protocol won't go down. So the PBR traffic will get black-holed and not failover to MPLS or any other route in the routing table. Hence, he needed to use the "set ip next-hop verify-availablity" with tracking for that PBR route, in the event that it goes down, the traffic can failover to the MPLS link.
I've simulated the MPLS link by using EIGRP, so those routes are dynamic. I configured IP SLA, and then use event manager to trigger based on the state of the tracking object. If fiber is up, PBR is installed, if fiber goes down, PBR config is removed.
We use an EEM applet to track the state of "rttMonCtrlOperTimeoutOccured" object in the CISCO-RTT-MON MIB. A value of 1 or true is indicative of "timeout" and 2 or false of "OK / reachable".
Note: The IP SLA (NUM) is the last number in the OID; i.e the last digit 1 in "188.8.131.52.184.108.40.206.220.127.116.11.1.6.1"