Help with an EEM script for MU HSRP active active problem

Unanswered Question
Aug 14th, 2010
User Badges:

I have a pair of 6059 switch/routers running s72033-adventerprisek9_wan-mz.122-33.SXI4a.bin


I'm experiencing an hsrp active active situation that knocks down most of the services on my campus.


I'm new to EEM.  MY SE suggested using it to assiste with diagnostics.


I presume I have to install something called EAS on the router and have documentation for the version 2.1 package.


Can someone verify what I should install on the router?  The authoratative URL would probably be sufficient for this.


I would also love help writing a script that does the following.

Monitor the message

Aug 14 13:17:34 hughubrou030a-1 1726: 001723: Aug 14 13:17:33 EDT: %HSRP-5-STATECHANGE: Vlan702 Grp 17 state Standby -> Active


issue

int gi 5/2

no shut

exit


Wait 1 minute

issue

interface vlan 702

shut

exit

int gi 5/2

shut

exit


Then start monitoring for the next event.


Thanks for any help you can provide.


Joe Simpson

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
Joe Clarke Sat, 08/14/2010 - 12:20
User Badges:
  • Cisco Employee,
  • Hall of Fame,

    Founding Member

This EEM applet policy should accomplish what you want:


event manager environment quote "

!

event manager applet hsrp-watch

event syslog pattern "HSRP-5-STATECHANGE: Vlan702 Grp 17 state Standby -> Active"

action 001 cli command "enable"

action 002 cli command "config t"

action 003 cli command "int gi5/2"

action 004 cli command "no shut"

action 005 cli command "event manager applet hsrp-pause"

action 006 cli command "event timer countdown time 60"

action 007 cli command "action 1.0 cli command enable"

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

action 009 cli command "action 3.0 cli command $quote int vlan702$quote"

action 010 cli command "action 4.0 cli command shut"

action 011 cli command "action 5.0 cli command $quote int gi5/2$quote"

action 012 cli command "action 6.0 cli command shut"

action 013 cli command "action 7.0 cli command $quote no event manager applet hsrp-pause$quote"

action 014 cli command "action 8.0 cli command end"

action 015 cli command "end"

jsimpson Sat, 08/14/2010 - 12:59
User Badges:

Thank you Joseph


I did find some event manager info, but had not been able to find all of the ayntax.


I'm confused by two lines


action 005 cli command "event manager applet hsrp-pause"

As I read it this line attempts to create a new event manager applet


The lines containing

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


appear to write an applet with the applet, but what triggers the harp-pause applet?


Thanks

Joe Simpson

Joe Clarke Sat, 08/14/2010 - 13:01
User Badges:
  • Cisco Employee,
  • Hall of Fame,

    Founding Member

Yes, the hsrp-watch applet configures another applet.  The second applet will countdown 60 seconds, execute, then unconfigure itself.  This adds the delay you wanted.

Actions

This Discussion