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

EEM script to unshut a interface with a delay after being admin downed

csterry23
Level 1
Level 1

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!

2 Replies 2

Hello

You can use tracking instead with a delay 

 

track 10 interface xxx

delay xxx

event track 10

 

 


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

Joe Clarke
Cisco Employee
Cisco Employee

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.