cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
20468
Views
95
Helpful
17
Replies

EEM event manager applet - IPSLA ping

fabiogarcia
Level 1
Level 1

Hello All!!

I need to create a EEM script to shutdown both "interface VLAN" and interface giga if certain IP address stops to reply pings....

 

I did that:

event manager applet SHUT_INT
 event ipsla group-name "PING" reaction-type timeout dest-ip-addr 172.26.0.30 maxrun 5
 action 1 cli command "enable"
 action 2 cli command "conf t"
 action 3 cli command "interface vlan 510"
 action 4 cli command "shutdown"
 action 5 cli command "interface Gi0/20"
 action 6 cli command "shutdown"

 

It seems it doesn't work... Does everybody have any suggestion?

thanks in advance!!!

17 Replies 17

its ok , but i need Work no shut int gi 1/0/1 when I have ping 

Try this , for me is working:

event manager applet ISP_UP
event syslog pattern "10 ip sla 10 reachability Down -> Up"
action 1 cli command "enable"
action 2 cli command "conf t"
action 3 cli command "int Tw1/0/25"
action 4 cli command "no shut"
action 5 cli command "end"

fabiogarcia
Level 1
Level 1

Tried again this version this morning and that worked.... probably I did some mistake yesterday...

 

Thank you very much.... below my config used

 

ip sla 11
 icmp-echo X.X.X.X source-ip X.X.X.X
ip sla schedule 11 life forever start-time now
ip sla reaction-configuration 11 react timeout threshold-type immediate
ip sla enable reaction-alerts

event manager session cli username "admin"
event manager applet test
 event ipsla operation-id 11 reaction-type timeout
 action 1.0 cli command "enable"
 action 1.1 cli command "conf t"
 action 1.2 cli command "interface vlan 530"
 action 1.3 cli command "shut"
 action 1.4 cli command "interface G0/4"
 action 1.5 cli command "shut"
 action 1.6 cli command "end"