cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
875
Views
0
Helpful
1
Replies

EEM - Run command if BOTH actions are met

Nikolas Valerio
Level 1
Level 1

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"

1 Reply 1

Joe Clarke
Cisco Employee
Cisco Employee

Use a boolean track statement to combine the two IP SLA objects.

track 3 list boolean or

 object 1

 object 2

Then just do:

event track 3 state down