cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
15090
Views
0
Helpful
4
Replies

EEM script to alert on IP SLA failures

burleyman
Level 8
Level 8

I have the following IP SLA set up and would like to do the following. I would like to have a log entry if any of the below have a failure and then send an email alerting to that failure. Is there a way to do this with EEM?

ip sla 1010

udp-jitter 64.xxx.xxx.xxx 3456 num-packets 30 interval 25

history hours-of-statistics-kept 24

ip sla schedule 1010 life forever start-time now

ip sla 1011

tcp-connect 64.xxx.xxx.xxx 2000

history hours-of-statistics-kept 24

ip sla schedule 1011 life forever start-time now

ip sla 1012

icmp-echo 64.xxx.xxx.xxx

frequency 30

history hours-of-statistics-kept 24

history distributions-of-statistics-kept 10

ip sla schedule 1012 life forever start-time now

Thanks,

Mike

1 Accepted Solution

Accepted Solutions

Joe Clarke
Cisco Employee
Cisco Employee

Sure.  You can use Enhanced Object Tracking to track each IPSLA collector and have EEM react to timeouts.  For example:

track 1 ip sla 1010 reachability

!

event manager applet track-1010

event track 1 state down

action 1.0 syslog msg "IPSLA collector 1010 timed out"

action 2.0 mail from "user@example.com" to "user@example.com" subject "IPSLA Collector 1010 is down" body "IPSLA Collector 1010 has timed out" server "10.1.1.1"

View solution in original post

4 Replies 4

Joe Clarke
Cisco Employee
Cisco Employee

Sure.  You can use Enhanced Object Tracking to track each IPSLA collector and have EEM react to timeouts.  For example:

track 1 ip sla 1010 reachability

!

event manager applet track-1010

event track 1 state down

action 1.0 syslog msg "IPSLA collector 1010 timed out"

action 2.0 mail from "user@example.com" to "user@example.com" subject "IPSLA Collector 1010 is down" body "IPSLA Collector 1010 has timed out" server "10.1.1.1"

Thanks that is very helpful. Now what about something like this?

From below I would like to alert if there is a failure (see the bold)

IP_SLA_2821#show ip sla stat 1020
IPSLAs Latest Operation Statistics

IPSLA operation id: 1020
Type of operation: udp-jitter
Latest RTT: 23 milliseconds
Latest operation start time: 14:25:34.377 EDT Fri Aug 24 2012
Latest operation return code: OK
RTT Values:
Number Of RTT: 30  RTT Min/Avg/Max: 23/23/33 milliseconds
Latency one-way time:
Number of Latency one-way Samples: 30
Source to Destination Latency one way Min/Avg/Max: 9/10/16 milliseconds
Destination to Source Latency one way Min/Avg/Max: 13/13/23 milliseconds
Jitter Time:
Number of SD Jitter Samples: 29
Number of DS Jitter Samples: 29
Source to Destination Jitter Min/Avg/Max: 0/1/6 milliseconds
Destination to Source Jitter Min/Avg/Max: 0/1/10 milliseconds
Packet Loss Values:
Loss Source to Destination: 0  Loss Destination to Source: 0
Out Of Sequence: 0 Tail Drop: 0
Packet Late Arrival: 0 Packet Skipped: 0
Voice Score Values:
Calculated Planning Impairment Factor (ICPIF): 0
Mean Opinion Score (MOS): 0
Number of successes: 33
Number of failures: 0
Operation time to live: Forever

That's what the EOT example I gave should give you.

Sorry, I misunderstood. I thought it was just for the ICMP and would be different for the others. Thank you for your help and I will try it out.

Mike