03-03-2016 06:41 AM
Hi team,
I am having problems with EEM script. Basically, It kicks off when a specific router loses connectivity back to the core. If the tunnel reset does not work, it is supposed to schedule a reload at 2300 that night.
The script correctly restarts the tunnel, but it does not schedule the reload. Any assistance is much appreciated.
!
track 10 ip sla 1 reachability
delay down 120 up 10
!
!
ip sla auto discovery
ip sla 1
icmp-echo 10.230.50.1 source-ip 10.108.4.1
ip sla schedule 1 life forever start-time now
!
event manager applet reset_tun
event track 10 state down
action 1.0 syslog msg "Unable to reach RHQ"
action 1.1 cli command "enable"
action 1.2 cli command "config t"
action 1.3 cli command "int tun 0"
action 1.4 cli command "shut"
action 1.5 cli command "no shut"
action 1.6 cli command "end"
action 1.7 cli command "reload at 23:00"
action 1.8 cli command "n"
action 1.9 cli command "y"
action 2.0 cli command "end"
action 2.1 syslog msg "execute succesful"
Thank you in advance for your help
Carlos
03-03-2016 03:25 PM
You don't need action 2.0, but the real problem is "reload at" is interactive, and you have not created proper actions to deal with it. What you need is:
action 1.7 cli command "reload at 23:00" pattern "Save"
action 1.8 cli command "n" pattern "reload"
action 1.9 cli command "y"
03-04-2016 07:06 AM
Hi Joe.
Thank you for replay back. I will try to implement the script the way you mentioned. I will let you know how it goes.
Regards,
Carlos
03-15-2016 08:11 AM
it called the script but didn't actually execute the reload part.
Mar 4 11:10:39: %HA_EM-6-LOG: router_reload: Schedule the reload
rbmer01#show reload
No reload is scheduled.
Thank you
03-15-2016 05:24 PM
You have to make sure your send/expect lines up with the prompts the "reload at" command gives you. What does the dialog look like when you execute "reload at" manually?
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