Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Webcast-Catalyst9k
New Member

Reload my cisco 1941 router when a ping test fails.

I am trying to create a Script to reload my cisco 1941 router when a ping test has failed.

I am using IP SLA to ping and tracking snmp oid. What I want to do is to stop the router from reloading after 4 times if the ping test is still failing . But when the ping are successful again to restart the applet. I have the reload configured but cannot figure out how to do the rest. Any suggestion?

ip sla 100

icmp-echo 172.28.255.60

frequency 10

ip sla schedule 100 life forever start-time after 00:10:00

event manager applet PingFailed

event snmp oid 1.3.6.1.4.1.9.9.42.1.2.9.1.6.100 get-type exact entry-op lt entry-val "2" poll-interval 10

trigger occurs 160 period 10800

action 1.0 reload

Everyone's tags (2)
1 REPLY
Silver

Reload my cisco 1941 router when a ping test fails.

Hi,

This might work but it's really for example purposes.

track 10 ip route 1.1.1.1/32 reachability

delay down 3 up 3

event manager applet trackup

event track 10 state up

action 1.0 cli command "enable"

action 2.0 cli command "reload cancel"

action 3.0 cli command "end"

event manager applet trackfail

event track 10 state down

action 1.0 cli command "enable"

action 2.0 cli command "reload in 10"

action 3.0 cli command "end"

1219
Views
0
Helpful
1
Replies
CreatePlease to create content