09-17-2014 08:44 AM
I want to run an EEM after router reloads only if the reload was initiated by an EEM applet. I want this EEM to trigger after 10 mins of reload.
Solved! Go to Solution.
09-19-2014 10:36 AM
Then you could have an applet that runs a reload and configures this other applet if the reload reason is right. You can use the example below as a template:
event manager environment q "
!
event manager applet reload
event timer cron cron-entry "@reboot"
action 001 cli command "enable"
action 002 cli command "show ver | inc Last reload reason: Embedded Event Manager action"
action 003 regexp "Embedded Event Manager action" $_cli_result
action 004 if $_regexp_result eq 1
action 005 cli command "config t"
action 006 cli command "event manager applet do-stuff"
action 007 cli command "event timer countdown time 600"
action 008 cli command "action 1.0 cli command enable"
action 009 cli command "action 2.0 cli command $q config t$q"
...
09-18-2014 08:51 AM
I don't recall, but does the reload reason (in show ver) actually state reloaded by EEM (or similar) if an EEM policy reloads the device?
09-19-2014 10:04 AM
Yes it does as shown below...
Last reload reason: Embedded Event Manager action
09-19-2014 10:36 AM
Then you could have an applet that runs a reload and configures this other applet if the reload reason is right. You can use the example below as a template:
event manager environment q "
!
event manager applet reload
event timer cron cron-entry "@reboot"
action 001 cli command "enable"
action 002 cli command "show ver | inc Last reload reason: Embedded Event Manager action"
action 003 regexp "Embedded Event Manager action" $_cli_result
action 004 if $_regexp_result eq 1
action 005 cli command "config t"
action 006 cli command "event manager applet do-stuff"
action 007 cli command "event timer countdown time 600"
action 008 cli command "action 1.0 cli command enable"
action 009 cli command "action 2.0 cli command $q config t$q"
...
09-22-2014 07:07 AM
Thank You Joseph, it worked.
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