Reload Router max. once/24 hr while other actions will run all the time within an EEM applet
I have an EEM script which runs on a track when it goes down, within the actions i have different other things to check and take actions accordingly and they are working fine. I want to include a router reload within the same applet which should only trigger once within 24 hrs., no matter how many times the EEM runs during 24 hrs.
Here is my current applet:
event manager applet MyApplet authorization bypass event track 10 state down maxrun 3600 action 1.0 cli command "enable" action 2.0 cli command "conf t" action 3.0 cli command "service internal" action 3.1 cli command "do test cellular 0 modem-power-cycle" action 3.2 cli command "no service internal" action 4.0 wait 720 action 5.0 track read 10 action 6.0 if $_track_state eq "down" action 6.1 cli command "int cell0" action 6.2 cli command "shut" action 6.3 cli command "controller cell 0" action 6.4 cli command "lte radio off" action 6.5 wait 60 action 6.6 cli command "no lte radio off" action 6.7 cli command "int cell0" action 6.8 cli command "no shut" action 6.9 end At the end i want to add another wait of 10 sec. and check the track state again, if it is still Down I want to trigger a reload, but when router comes back after reload and my EEM triggers again, i don't want to reload if the last reload was triggered within last 24 hrs.
The way you're using wait in this applet is not ideal. It would be better, especially for the long wait, to have this broken up into multiple applets so that they can run asynchronously. In fact, given what you want to do for this reload, that would be the better way to go. If you configured a second applet at the end of this applet like:
Then you could have another applet that reacts to the tracked object coming up. This applet would simply unconfigure the reload-countdown applet. Thus, if the track comes back up, the reload will not happen.
This is actually a pretty cool feature, i didn't even know it existed until I was looking for a solution to advertise a subnet (prefix in BGP talk), only if a certain condition existed. This is exactly what conditional advertisements does
j ai une question j ai achete un routeur cisco 887VA-k9 , je le configuré avec la configuration ci- dessous
si je le lier avec mon pc portable sur l un de ses ports directement ça marche toute est bien ( la connexion internet + m...
Attached policy provides CLI access to the Cisco 4G router over text messaging. Two files are in the attached .tar file:
2. PDF with instructions on how to load and use the .tcl file.