[c-nsp] EEM BGP

Arie Vayner (avayner) avayner at cisco.com
Tue Dec 15 16:33:09 EST 2009


Tony,

An easy trick is to insert a delay in your script that does the shut,
and then after the delay to do the unshut.
As there is no "wait" action in older EEM codes, you can use a trick
with a ping that would never be answered, and a long timeout value.

event manager applet delay
 event syslog pattern "xxx" maxrun 630
 action 1.0 cli command "ping 1.1.1.1 repeat 1 timeout 600"

Does it work for you?

Arie

-----Original Message-----
From: cisco-nsp-bounces at puck.nether.net
[mailto:cisco-nsp-bounces at puck.nether.net] On Behalf Of Tony Varriale
Sent: Tuesday, December 15, 2009 23:11
To: cisco-nsp at puck.nether.net
Subject: [c-nsp] EEM BGP

I've been having some issues with BGP peers dropping/flapping and tried
to come up with a little EEM applet that would not only down a peer
based on syslog entries but bring it back up.

The bringing down part is easy and tested to work great.  But I'm having
a hard time with the bringing up part.

Essentially I want to say, after x minutes, no shut the peer if you see
the shut/BGP peer down/another arbitary message in the syslog.

Any ideas?  EEM 2.2 and/or 3.0 are fine.  Thanks!

tv
_______________________________________________
cisco-nsp mailing list  cisco-nsp at puck.nether.net
https://puck.nether.net/mailman/listinfo/cisco-nsp
archive at http://puck.nether.net/pipermail/cisco-nsp/


More information about the cisco-nsp mailing list