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

EEM SCRIPT : How to change/delay Trigger time of event manager for event track

Dear Freinds

I have below requirement I have a Track 111 set whch will monitor IP SLA 555  and set its state Up and Down based on sla status.

Now Based on tracking state, the eem applet should trigger 2 scripts. when the track state is down it triggers INSTALL_ROUTE and whent the track state chnages to UP its triggers event manager REMOVE_ROUTE

Now I have come out with below solution and its working fine . BUT.........

Issue is, that i need to increase the timer of trigger of REMOVE_ROUTE to 10 mins after  the track state changes to Up from down state, which  currently cannot set more than 3 mins using command delay down 10 up 180 under track ( see in BOLD)

as of now  i cannot keep the track down for maximum  3 mins .

How can I acheive that when the track state goes down and later comes up the eem event REMOVE_ROUTE should  trigger after 10 mins or more after the event state change

OR

How to incrase the track timer so that should not chnage its state to UP for 10 mins even the IP SLA responder come up.Appreciate your help and support

ip sla 555

icmp-echo 192.168.128.3 source-ip 192.168.163.1

timeout 1000

frequency 3

ip sla schedule 555 life forever start-time now

track 111 ip sla 555 reachability

delay down 10 up 180 (180  sec is the MAXIMUM secs) --- we have a problem here that this value cannot go beyond 180 secs

event manager session cli username "ANA-MANAGER"

event manager applet INSTALL_ROUTE

event track 111 state down

action 1.0 cli command "enable"

action 2.0 cli command "config t"

action 3.0 cli command "ip route 172.20.0.0 255.255.0.0 null 0"

action 4.0 syslog msg "AAA and ACR BLACKHOLE ROUTE INSTALLED"

event manager applet REMOVE_ROUTE

event track 111 state up

action 1.0 cli command "enable"

action 2.0 cli command "config t"

action 3.0 cli command "no ip route 172.20.0.0 255.255.0.0 null 0"

action 4.0 syslog msg "AAA and ACR BLACKHOLE ROUTE REMOVED"

1 ACCEPTED SOLUTION

Accepted Solutions
Cisco Employee

EEM SCRIPT : How to change/delay Trigger time of event manager f

This is a rather common question here.  If you search this community for "track" posts, you'll see the typical solution for this problem.  That is, you can nest one applet within another to give yourself as much time as you need.  For example

https://supportforums.cisco.com/message/3605814#3605814 shows one way this can be done.  The time where is only 15 seconds, but you can increase that to 600 to give you the 10 minutes you need.

1 REPLY
Cisco Employee

EEM SCRIPT : How to change/delay Trigger time of event manager f

This is a rather common question here.  If you search this community for "track" posts, you'll see the typical solution for this problem.  That is, you can nest one applet within another to give yourself as much time as you need.  For example

https://supportforums.cisco.com/message/3605814#3605814 shows one way this can be done.  The time where is only 15 seconds, but you can increase that to 600 to give you the 10 minutes you need.

1499
Views
0
Helpful
1
Replies
CreatePlease to create content