Hello!
I am trying to build a simple EEM (my first time on this). The ideia is simple, to check if my ISP link is offline based on 2 IP SLA tests and if both are down, run EEM.
ip sla 1
icmp-echo 8.8.8.8
frequency 10
ip sla schedule 1 life forever start-time now
ip sla 2
icmp-echo 187.32.159.126
frequency 10
ip sla schedule 2 life forever start-time now
event manager applet ISP_OFFLINE_REMOVE_ROUTE
event track 1 state down
event track 2 state down
action 1.0 syslog msg "ISP IS OFFLINE - IP SAL 1 TESTING IS DOWN"
action 2.0 cli command "enable"
action 3.0 cli command "conf term"
action 4.0 syslog msg "REMOVING DEFAULT ISP ROUTE"
action 5.0 cli command "no ip route 0.0.0.0 0.0.0.0 172.24.114.254"
action 6.0 syslog msg "INTERNET RUNNING OVER MPLS LINK"