Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

Cisco EEM. Delay between action cli

Hi

I have Cisco  Catalyst 6500 with IOS Version 12.2(17r)SX5

I need  real-time monitornig of failed interface, to shut it administratively  down and after 5 minutes "no shutdown" it.

I think is good idea to use Cisco EEM for this task.

My algorithm is below:

1. EEM script is looking for event about  failed interface.

2. EEM script is shutting interface down.

3. EEM script is waiting 5 minutes.

4. EEM script is enabling interface.

I know how to configure EEM for steps 1, 2 and 4, but step 3 I do not.

Help solve this task, please.

Everyone's tags (4)
1 ACCEPTED SOLUTION

Accepted Solutions
Cisco Employee

Cisco EEM. Delay between action cli

That's not the version of code running on your switch. That looks like boot ROM code.  In any event, unless you have a Sup2T, you have EEM 2.x.  This solution should work for you.

event manager environment q "

!

event manager applet failed-interface

event ...

action 001 cli command "enable"

action 002 cli command "config t"

action 003 cli command "interface INTF"

action 004 cli command "shut"

action 005 cli command "event manager applet reenable-intf"

action 006 cli command "event timer countdown time 300"

action 007 cli command "action 1.0 cli command enable"

action 008 cli command "action 2.0 cli command $q config t$q"

action 009 cli command "action 3.0 cli command $q interface INTF$q"

action 010 cli command "action 4.0 cli command $q no shut$q"

action 011 cli command "action 4.1 cli command $q no event manager applet reenable-intf$q"

action 012 cli command "action 5.0 cli command end"

action 013 cli command "end"

2 REPLIES
Cisco Employee

Cisco EEM. Delay between action cli

That's not the version of code running on your switch. That looks like boot ROM code.  In any event, unless you have a Sup2T, you have EEM 2.x.  This solution should work for you.

event manager environment q "

!

event manager applet failed-interface

event ...

action 001 cli command "enable"

action 002 cli command "config t"

action 003 cli command "interface INTF"

action 004 cli command "shut"

action 005 cli command "event manager applet reenable-intf"

action 006 cli command "event timer countdown time 300"

action 007 cli command "action 1.0 cli command enable"

action 008 cli command "action 2.0 cli command $q config t$q"

action 009 cli command "action 3.0 cli command $q interface INTF$q"

action 010 cli command "action 4.0 cli command $q no shut$q"

action 011 cli command "action 4.1 cli command $q no event manager applet reenable-intf$q"

action 012 cli command "action 5.0 cli command end"

action 013 cli command "end"

Cisco EEM. Delay between action cli

Joseph Clarke,

Thank you, your solution is fully working for me.

And you was right about IOS version, it was copy-paste error. Correct version is 12.2(33)SXI8

5506
Views
0
Helpful
2
Replies
CreatePlease login to create content