cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1736
Views
0
Helpful
6
Replies

EEM CLI Commands not executing

scecie1977
Level 1
Level 1

I am new to scripting, SLA and EEM and have been browsing the forums and documenation for a couple of days now learning what I can.  I cannot get my event manager applet to trigger for some reason.  I do get the following Syslog message based on my ip sla reaction config:

Aug  4 21:25:13.915: %RTT-3-IPSLATHRESHOLD: IP SLAs(100): Threshold Occurred for timeout

My configuration is below

!

!

ip sla 100

icmp-echo 2.2.2.2 source-ip 1.1.1.1

threshold 1000

timeout 1000

frequency 1

ip sla schedule 100 start now life forever

ip sla reaction-config 100 react timeout threshold-type xofy 2 5 action-type trapOnly

!
!

event manager applet ipsla-ploss

 description PROACTIVE WAN PACKET LOSS SCRIPT

 event ipsla operation-id 100 reaction-type timeout

 action 1.0 cli command "enable"

 action 1.1 cli command "conf t"

 action 1.2 cli command "ip access-list standard bgp-routes-in"

 action 1.3 cli command "5 deny 5.5.5.5"

 action 1.4 cli command "6 deny 6.6.6.6"

 action 1.5 cli command "end"

!

!

Any help is greatly appreciated!

1 Accepted Solution

Accepted Solutions

Add the following to your config:

ip sla logging

ip sla enable reaction-alerts

View solution in original post

6 Replies 6

Joe Clarke
Cisco Employee
Cisco Employee

Please enable "debug event manager action cli" and then post the log output after reproducing the trigger.

Hi Joe, I get no output from the debug, only the following shows up in the logs:

!

Aug 5 09:01:14.092: %RTT-3-IPSLATHRESHOLD: IP SLAs(100): Threshold Occurred for timeout

Aug 5 09:01:17.932: %TRACK-6-STATE: 5 ip sla 100 reachability Up -> Down

!

FYI, this is on a 2911 running 15.4(3)M4 with perm licenses for security and uc.  Also, I have through testing been able to get EEM to trigger off a tracking event and make CLI changes on this router, but that doesn't give me what I need and was just to verify that I set up the username privileges correctly.

Thanks,

Shawn

Add the following to your config:

ip sla logging

ip sla enable reaction-alerts

Awesome...I was missing the "ip sla enable reaction-alerts" command. Now I just have to figure out how to fix it so it only triggers when the connection goes down, and not also when it restores. Any hints on that?

if $_ipsla_condition eq "Occurred"

...

end

This worked like a charm. Thanks so much Joe!

Review Cisco Networking for a $25 gift card