cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2227
Views
0
Helpful
7
Replies

IP SLA and EEM script not working

Hi team,

 

I have tested in several ways but it does not work, 

 

I have 2 ISPs, so I made the IP SLA for icmp echos to test the public IP 208.67.222.222 that it does not receive a ping icmp's the strack in the static route will know about it

 

and its supposed to execute the EEM script

 

When I test and shutdown the other end of the border router to simulate a failure, even the show track 87 shows reachibility down but still the applet does not run

 

could you please check and help me if the script below is correct of if Im missing something?

 

ip sla 87
icmp-echo 208.67.222.222 source-ip 192.168.1.1
frequency 5
exit

 

ip sla schedule 87 life forever start-time now

track 87 ip sla 87 reachability
delay down 8 up 10


event manager applet failover_test
event track 87 state down
action 1.0 cli command "enable"
action 1.1 cli command "conf t"
action 1.2 cli command "route-map TEST-PBR"
action 1.3 cli command "no set ip next-hop 10.1.1.1"
action 1.4 cli command "set ip next-hop 10.2.2.2"
action 1.5 cli command "end"
action 1.6 cli command "write memory"
!

ip route 208.67.222.222 255.255.255.255 10.1.1.1 name EEMScript track 87

1 Accepted Solution

Accepted Solutions

Joe Clarke
Cisco Employee
Cisco Employee

A track applet will only execute on a state transition.  Therefore, track 87 needed to be up first.  It's not clear from this that the track actually transitioned state.

If it does transition from Up to Down, then you should check "show event manager history event" to confirm that the policy didn't actually run.

View solution in original post

7 Replies 7

Joe Clarke
Cisco Employee
Cisco Employee

A track applet will only execute on a state transition.  Therefore, track 87 needed to be up first.  It's not clear from this that the track actually transitioned state.

If it does transition from Up to Down, then you should check "show event manager history event" to confirm that the policy didn't actually run.

Thanks, you were right, I actually put the command you suggested to check if it was actually flapping or not, 

 

 

Any chance the final script could be posted as I have the same requirements for my customer ?

I don't think any additional changes were needed to the originally posted applet.  As I said, EEM only detects state transitions.  As long as the tracked object transitioned from up to down, the policy would fire.

I thought a sequence of commands had to be changed ?


I did not suggest that, nor did I get the impression that happened.

Hi, 

Thats true, 

 

I did not modify anything, the script as it is there, it works perfectly,

 

but that came to my mind as Clarke mentioned,  

 

I issued the show event manager policy registered or show event manager history events so I knew there was something wrong that was not triggering it

 

once I put the FW rule, denied it, and worked, now the script is functional 

 

hope that helps 

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: