10-02-2012 01:14 PM - last edited on 03-25-2019 04:22 PM by ciscomoderator
I'm using this EEM script to shut down a port when a cable is pulled or port goes down for any other reason. It works to shut down the port but I'm facing the following problem
1. I have a "wait 120"configured but it never re-enable the port after 120 seconds
2. If I attempt to re-enable the port manually it immedeately shuts it down using the EEM unless I remove the event manager configuration.
Please advise.
event manager applet interface_down
event syslog pattern ".*UPDOWN.*FastEthernet0/4.* changed state to down"
action 1.0 syslog msg "Interface FastEthernet0/4 has gone down"
action 1.1 cli command "enable"
action 1.2 cli command "conf t"
action 1.3 cli command "Interface FastEthernet0/4"
action 1.4 cli command "shut"
action 1.5 cli command "end"
action 1.6 syslog msg "Interface FastEthernet0/4, changed state to administratively down"
action 1.7 wait 120
action 2.1 cli command "enable"
action 2.2 cli command "conf t"
action 2.3 cli command "Interface FastEthernet0/4"
action 2.4 cli command "no shut"
action 2.5 cli command "end"
10-02-2012 03:43 PM
Hello,
You can use debug event manager action cli to see where the actually problem is . then use show logg .
It may be authorization issue. You may be need to add
event manager session cli username "twdadmin"
if there is any user name involve.
Please try and let me know.
thanks
10-02-2012 03:53 PM
10-02-2012 07:32 PM
Tried this already but it crashed my router as soon as pulled the cable, I'm not too good in tcl and prefer to use applet instead.
Sent from Cisco Technical Support iPhone App
10-03-2012 09:12 AM
Any one else have an idea why EEM is disabling port when i attempt to re-enable it?
Item#2 in my original post. The only work around I see it to completely remove the EEM configuration, re-enable the port and re-apply EEM configuration, anything wrong with my applet?
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