cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1455
Views
0
Helpful
4
Replies

EEM ip sla is not working

sunilferrao
Level 1
Level 1

Hi,

i need help with EEM script

have tried below script on 1841 with 12.4(24)T5  but not working

snmp-server enable traps ipsla

snmp-server enable traps event-manager

ip sla 10

icmp-echo 192.168.100.50 source-interface Loopback0

frequency 300

ip sla schedule 10 start-time now

track 20 ip sla 10 reachability

delay down 180

!

!

option one  tried

event manager applet RESET

event track 10 state down

action 01.0 syslog msg "No ping response "

action 02.0 syslog msg "Reloading The Router"

action 03.0 reload

!

end

option two

event manager applet RESET

event syslog pattern "%TRACKING-5-STATE: 20 ip sla 10 reachability Up->Down"

action 01.0 syslog msg "No ping response "

action 02.0 syslog msg "Reloading The Router"

action 03.0 reload

!

end

i want to try ping remote ip every 5 mins , if ping fails wait for 3 mins then trigger reload , and router come up again if ping fails reload again

both are not working as expected ,any help highly appreciated


1 Accepted Solution

Accepted Solutions

Joe Clarke
Cisco Employee
Cisco Employee

Option 1 should work, but you've configured it to track object 10 instead of object 20.  Additionally, without a lifetime configured, the IP SLA collector will die after one hour.  I'm not sure this is what you want.

If things are still failing after correcting the configuration, post the output of "show ip sla stat 10" and "show track 20" when the reload condition should be met.

View solution in original post

4 Replies 4

Joe Clarke
Cisco Employee
Cisco Employee

Option 1 should work, but you've configured it to track object 10 instead of object 20.  Additionally, without a lifetime configured, the IP SLA collector will die after one hour.  I'm not sure this is what you want.

If things are still failing after correcting the configuration, post the output of "show ip sla stat 10" and "show track 20" when the reload condition should be met.

Thanks Joseph for your reply

basically i am looking for option like ip sla should run 24X7X365 whenever  ping fails wait for 3 minutes and then reload router if ping still fails , can you please help me on this

Your config is mostly correct.  You need to do:

ip sla 10

icmp-echo 192.168.100.50 source-interface Loopback0

frequency 300

ip sla schedule 10 start-time now life forever

track 20 ip sla 10 reachability

delay down 180

!

!

option one  tried

event manager applet RESET

event track 20 state down

action 01.0 syslog msg "No ping response "

action 02.0 syslog msg "Reloading The Router"

action 03.0 reload

Thanks Joseph i will implement this and revert to you

Many Thanks

Review Cisco Networking for a $25 gift card