cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1992
Views
5
Helpful
3
Replies

Event Manager Applet

paultw_davey
Level 1
Level 1

Hello

We have a pair of Nexus 5000 switches which run a script as follows, due to the switches not running IP SLA:

 

event manager applet track-next-hop
   event snmp oid 1.3.6.1.2.1.1.3.0 get-type exact entry-op ge entry-val 0 poll-interval 30
   action 1.0 cli command "source RouteTrack.py 0.0.0.0/0 Next_Hop IP_To_Track"


The idea of the script is that it monitors IP_To_Track every 30 seconds to see if it's available. If it is, then it adds a static route into the routing table for 0.0.0.0/0. If the IP_To_Track doesn't respond, it takes the route out of the routing table and it follows the advertised default route from our WAN.

 

This seems to have worked perfectly fine when we first put it in. However, it only ran approximately 50 times before it stopped running. Now, the route is still in the routing table and if IP_To_Track isn't contactable, the traffic fails.

Does anyone have any experience of this? Or know what I should be looking for?

 

The switches are on software version 7.3(0)N1(1).
This runs on a 2nd pair on another site as well which are Nexus 6000 on version 7.3(5)N1(1), which also has the same issue.

 

Any help would be greatly appretiated.

Thanks
Paul

1 Accepted Solution

Accepted Solutions

paultw_davey
Level 1
Level 1

We have now resolved this issue.

It appears that although the script only took a couple of seconds to run, at some point it had taken too long to run. We had to reboot the cores in order to get them to clear the history out, and added a 'maxrun' timer of 40 seconds and made the script run every 60 seconds instead of 30.

event manager applet track-next-hop
   event snmp oid 1.3.6.1.2.1.1.3.0 get-type exact entry-op ge entry-val 0 poll-interval 60
        maxrun 40
   action 1.0 cli command "source RouteTrack.py 0.0.0.0/0 Next_Hop IP_To_Track"

The script has now run over 8000 times since implementing it

View solution in original post

3 Replies 3

balaji.bandi
Hall of Fame
Hall of Fame

Can you post the contect of python script you calling inside the EEM script

 

Best practice, is there any reason you can run same script of information inside EEM, instead of calling external python script ?

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Hello,

I've attached a copy (renamed to .txt). We were told that this was required to do what we're trying to achieve due to the lack of IP SLA support

 

Thanks
Paul

paultw_davey
Level 1
Level 1

We have now resolved this issue.

It appears that although the script only took a couple of seconds to run, at some point it had taken too long to run. We had to reboot the cores in order to get them to clear the history out, and added a 'maxrun' timer of 40 seconds and made the script run every 60 seconds instead of 30.

event manager applet track-next-hop
   event snmp oid 1.3.6.1.2.1.1.3.0 get-type exact entry-op ge entry-val 0 poll-interval 60
        maxrun 40
   action 1.0 cli command "source RouteTrack.py 0.0.0.0/0 Next_Hop IP_To_Track"

The script has now run over 8000 times since implementing it