I have created an applet which tracks the latency and takes the specified action if the same goes beyond the threshold. It is working pretty well but the point I just want to understand is that whether is there any option in EEM to check multiple conditions such as the specified condition should trigger only if
The point I want to understand is that whether we can perform boolean operations within a single applet with two different conditions ?
Thanks in advance
Yes, you can. EEM policies can have multiple conditions since EEM 2.4. If you're using IPSLA for this, you will need two reaction configurations to track both latency and packet loss. Then you can configure EEM to do an "and" trigger on both:
event tag latency ipsla reaction-type rtt ...
event tag loss ipsla reaction-type packetLossSD
trigger period 1
correlate event latency and event loss
Thanks for your response.
Could you please help me with an example which makes the interface Gig0/1 down when one of the conditions met [ either latency goes beyond 100 ms or packet loss is more than 5%] within a single applet.
Thanks in advance.
I am trying to create an IPsla monitor to check latency only. If it goes above say 100 ms I want to trigger an action. Please can you post the IPsla config you created to track latency?
I just want to understand your requirement clear. You can associate the IP SLA track object to any of the applications when the latency goes beyond the threshold.
Here is a sample config. Let's assume that 10.1.1.1 is the server to test for latency and 188.8.131.52 is the IOS device running "ip sla responder" to use for testing loss. This should do what you want:
ip sla 15
ip sla 16
udp-jitter 184.108.40.206 16384 num-packets 100
ip sla schedule 113 life forever start-time now
ip sla reaction-configuration 15 react rtt threshold-value 150 10 threshold-type immediate action-type trapOnly
ip sla reaction-configuration 16 react packetLossSD threshold-value 2 1 threshold-type immediate action-type trapOnly
ip sla logging traps
ip sla enable reaction-alerts
ip sla schedule 15 start-time now life forever
ip sla scheduler 16 start-time now life forever
event manager applet link-health
event tag latency ipsla operation-id 15 reaction-type rtt
event tag loss ipsla operation-id 16 reaction-type packetLossSD
correlate event latency or event loss
action 001 if $_ipsla_condition eq "Occurred"
action 002 cli command "enable"
action 003 cli command "config t"
action 004 cli command "int gi0/0"
action 005 cli command "shut"
action 006 mail server "220.127.116.11" to "firstname.lastname@example.org" from "email@example.com" subject "Shutting down link" body "Shutting down Gi0/0 do to high loss/latency"
action 007 cli command "end"
action 008 end