cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1656
Views
0
Helpful
1
Replies

Reload my cisco 1941 router when a ping test fails.

cwiebrecht
Level 1
Level 1

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

1 Reply 1

ngoldwat
Level 4
Level 4

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"

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Innovations in Cisco Full Stack Observability - A new webinar from Cisco