cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2912
Views
10
Helpful
6
Replies

eem and ip sla icmp-echo with reaction-conf

Martin Ermel
VIP Alumni
VIP Alumni

I am doing some test on a cisco1812 with Version 12.4(11)T4 with ip sla and eem. I have configured an ip sla icmp-echo and an ip sla reaction-conf on this sla. Action-type is TrapAndTrigger (alternatively TrapOnly) threshold-type is AVERAGE.

If the rtt value goes above the upper threshold the trap is fired and the action is rearmed when it goes below the lower threshold. So this all works fine. But it I am unable to let the trap appear in the syslog of the router. 'ip sla logging traps' is configured.

The target is to have eem action doing a cli configuration when the trap is fired. I want to do this with an eem applet and 'event syslog pattern .. 'or something like this.

If this is not possible is there another way to do this?

1 Accepted Solution

Accepted Solutions

This sounds like a job for EEM and TCL. With a TCL policy you could save the number and time of echo timeout, and only performs the configuration tasks when enough violations have occurred in a set amount of time. I don't immediately see how you would do this with an applet policy.

View solution in original post

6 Replies 6

Joe Clarke
Cisco Employee
Cisco Employee

With this version of IOS, you can make use of Enhanced Object Tracking. First, configure your IP SLA collector so that when latency hits the threshold you want, the operation times out. For example, if 2 seconds latency is bad, configure a timeout of 2 seconds. Then, assuming your IP SLA collector is ID 1:

track 1 rtr 1

event manager applet ipsla_watch

event track 1 state down

action 1.0 syslog msg "IP SLA collector has gone down"

action 2.0 cli command "enable"

action 3.0 cli command "config t"

action 4.0 cli command ...

action X.0 cli command "end"

The syslog messages will not be generated unless you do not have reaction traps configured. So, if you remove the reaction, you should start to see syslog messages (which can also trigger EEM policies).

Besides EOT and syslog, you could also use the SNMP event detector to poll the CISCO-RTTMON-MIB for various metrics about this collector (e.g. rttMonLatestRttOperSense).

Unfortunately, EEM 2.3 does not have the ability to listen for SNMP traps. This is coming in EEM 2.4.

If I use the timeout value inside the sla collector definition the eem gets fired if the latency goes above the threshold for a single collection. I used the reaction to define a threshold for an average value which fits better for my scenario (latency over WAN link no voice or video data) and as well the reaction can be rearmed.

Is there also a way to start the eem applet with EEM 2.3 in this scenario ? I looked insied the Mib but couldn't find a useful single value for this.

This sounds like a job for EEM and TCL. With a TCL policy you could save the number and time of echo timeout, and only performs the configuration tasks when enough violations have occurred in a set amount of time. I don't immediately see how you would do this with an applet policy.

so I will wait for EEM 2.4 and meanwhile start to play around with tcl policies

thanks!

Here's an untested policy I wrote that should do what you want. It requires three EEM environment variables to be set:

event manager environment ipsla_avg_coll_id COLLECTOR_ID

event manager environment ipsla_avg_num_polls NUM_POLLS

event manager environment ipsla_avg_threshold THRESHOLD

Where COLLECTOR_ID is your configured IP SLA collector ID, NUM_POLLS is the number of polls you want in your average, and THRESHOLD is the latency threshold in milliseconds.

The policy will run every 60 seconds, and look at rttMonLatestRttOperCompletionTime. It will collect up to NUM_POLLS samples before calculating the average. If the average is above THRESHOLD, a syslog message will be fired, and config commands will be run (you can control the commands to be run by editing the policy script, and updating the cmds list).

The list will be saved in a context so that future invocations will be able to retrieve the past values. Every time NUM_POLLS is reached, the list is reset. Again, this is untested, but I believe it should work.

thanks for this policy!

I hope I will find some time to test it next week and give an update.

Because I have no experience with tcl this policy wouldn't have been easy for me.

To give it a try with eem only, I thought of the option of TrapAndTrigger for reaction-configuration and use this to trigger another sla that would produce a timeout (e.g. ping an unreachable IP) for which I can track and define an eem...

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: