07-31-2011 02:19 AM
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
Solved! Go to Solution.
07-31-2011 03:55 PM
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.
07-31-2011 03:55 PM
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.
08-01-2011 08:48 AM
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
08-01-2011 10:36 AM
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
08-01-2011 10:33 PM
Thanks Joseph i will implement this and revert to you
Many Thanks
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide