cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1912
Views
0
Helpful
6
Replies
rcrevier
Beginner

EEM event correlate

Hi,

I have a problem to trigger correctly an event with a specific andnot condiftion.

I have one event interface link-event and the other one is an ip sla timeout.

Both events works fine stand alone. My trigger condition is the problem.

 

This is the config:

  event tag 1 neighbor-discovery interface GigabitEthernet1/0/15 link-event down
  event tag 2 ipsla operation-id 10 reaction-type timeout
   trigger period 30 delay 30 
   correlate event 1 andnot event 2

 

This is what i am looking for:

If the interface is down and the ip sla is in a Timeout state do not trigger.

If the interface is down and the ip sla is in OK state trigger the applet.

 

My problem is the delay. The events does not occur in the same exact time. The interface goes down and the ip sla timeout 15 seconds later but the trigger still occur.

 

Someone ?

1 ACCEPTED SOLUTION

Accepted Solutions

Period is the timeframe for the number of occurances and delay will postpone the EEM running for a certain period of time.   Neither of these will address your issue.

You could just trigger EEM from the neighbor discovery then inside the script run some logic to check the status of IPSLA such that if ipsla does not equal timeout then run the script or terminate the policy if it is timeout. 

View solution in original post

6 REPLIES 6
Daniel Frey
Cisco Employee

I believe the issue is that when the Gig1/0/15 link goes down, at that time the value of IPSLA is most likely OK (not timeout) so both statements are true according to your boolean "andnot" logic.  The IPSLA does timeout 15 seconds later but its too late since both events are already true.   You could test this by looking at the ipsla environment variables when the EEM policy triggers.

What do you want to accomplish?

 

This is exactly what happens. Both condition are true ! But the IPSLA could change like you said 15 seconds later.

If the condition change i would like take that change in consideration, first condition true and not the second one in a 30 seconds time frame.

I taught the trigger delay or period commands could accomplish this ?

Period is the timeframe for the number of occurances and delay will postpone the EEM running for a certain period of time.   Neither of these will address your issue.

You could just trigger EEM from the neighbor discovery then inside the script run some logic to check the status of IPSLA such that if ipsla does not equal timeout then run the script or terminate the policy if it is timeout. 

View solution in original post

Thank you Daniel.

A script inside a script. I knew there was a way to do that.

It is working fine.

This discussion has been reposted from Additional Communities to the EEM Scripting community.

Hi,

I have similar requirement. Could you please post your script? It would be a great help. I am just looking for the logic used and their syntax.

Regards,

Bhavesh

Content for Community-Ad