03-11-2015 12:32 PM
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 ?
Solved! Go to Solution.
03-11-2015 02:22 PM
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.
03-11-2015 01:51 PM
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?
03-11-2015 02:00 PM
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 ?
03-11-2015 02:22 PM
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.
03-12-2015 06:33 AM
Thank you Daniel.
A script inside a script. I knew there was a way to do that.
It is working fine.
07-31-2015 06:41 PM
This discussion has been reposted from Additional Communities to the EEM Scripting community.
10-30-2015 01:54 AM
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
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide