cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
943
Views
0
Helpful
2
Replies

EEM script to stop running on reload

pingduck
Level 1
Level 1

I have an EEM script that is triggered by interface down event. However, I found out that the event is triggered also when I issue the router reloads. There is no point running the script if reload is in progress. What is the best practice to detect the reload is in progress?

 

2 Replies 2

balaji.bandi
Hall of Fame
Hall of Fame

Post the EEM Script and Event to check

 

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

event manager applet myapplet

event tag 1 track 10 state down

event tag 2 counter name tunnel1down entry-val 1 entry-op ge exit-val 1 exit-op ge

event tag 3 timer cron cron-entry "@reboot"

trigger

  correlate event 1 or event 2 or event 3

action 1 track read 10

action 2 counter name "tunnel1down" op set value 0

action 3 if $_track_state eq "down"

action 4  puts "Do something!"

action 5  wait 10

action 6  counter name "tunnel1down" op inc value 1

action 8 end

 

I think I would need an additional check in action 3 to make sure router is not in a "winding down" state. What is a good check?