12-06-2018 08:19 PM
I'm new to EEM and how it functions, but I would love to learn. I'm trying to create a simple shutdown/no shutdown EEM script or scripts, but with a delay between the shutdown and no shutdown.
I recently tried using an initial applet to shut the interface, have the admin down syslog trigger another applet, and have that applet run a 3rd applet to no shut the interface... I can already tell that's way more convoluted than it needs to be, but as stated before I'm new to EEM.
Once the second applet runs/triggers for the admin down syslog I receive the error "Embedded Event Manager policy unshut-int not registered with event none Event Detector"
%HA_EM-6-LOG: trigger : DEBUG(cli_lib) : : IN : switch#event manager run unshut-int
%HA_EM-6-LOG: trigger : DEBUG(cli_lib) : : OUT :
%HA_EM-6-LOG: trigger : DEBUG(cli_lib) : : OUT : Embedded Event Manager policy unshut-int not registered with event none Event Detector
Below are the applets that I have configured.
event manager applet shut-int
event none
action 001 cli command "enable"
action 002 cli command "config t"
action 003 cli command "interface Gi2/13"
action 004 cli command "shut"
action 005 cli command "end"
event manager applet trigger
event syslog pattern "Interface GigabitEthernet2/13, changed state to administratively down"
action 001 cli command "enable"
action 002 cli command "event manager run unshut-int"
action 003 cli command "end"
event manager applet unshut-int
event timer countdown time 5000
action 001 cli command "enable"
action 002 cli command "conf t"
action 003 cli command "interface Gi2/13"
action 004 cli command "no shut"
action 005 cli command "end"
I appreciate any help!
12-07-2018 12:33 AM
Hello
You can use tracking instead with a delay
track 10 interface xxx
delay xxx
event track 10
12-18-2018 01:43 AM
Have a look at How To Introduce Large Delays In EEM Policies . This will allow you to do what you want with very flexible delays.
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