cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4557
Views
0
Helpful
6
Replies

IPSLA and EEM

sathvik k v
Level 3
Level 3

Hello All,

I have a one 10Mbps link and one 2Mbps link to another router. I want to shut 2Mbps link when 10Mbps link goes down so that traffic flows to other router via IBGP. the below configuration is not working can i get any help.

ip sla 10
frequency 30
icmp-echo 20.0.0.2 source-ip 20.0.0.1
ip sla schedule 10 life forever start-time now
ip sla reaction-configuration 10 react timeout threshold-type immediate action-type trapAndTrigger

event manager applet LOSS
event tag 1.3 ipsla operation-id 10 reaction-type timeout
trigger
correlate event 1.3
attribute tag 1.3 occurs 1
action 005   if $_ipsla_condition eq "Occurred"
action 010    cli command "enable"
action 015    cli command "configure term"
action 020    cli command "interfaces serial1/0"
action 025    cli command "shut"
action 030   else
action 035    cli command "enable"
action 040    cli command "configure term"
action 045    cli command "interfaces serial1/0"
action 050    cli command "no sh"
action 085   end

Regards,

Sathvik

1 Accepted Solution

Accepted Solutions

Joe Clarke
Cisco Employee
Cisco Employee

This applet is overcomplicated for what you want to do, plus you have a typo on your interface line.  Try this:

event manager applet LOSS

event ipsla operation-id 10 reaction-type timeout

action 005   if $_ipsla_condition eq "Occurred"

action 010    cli command "enable"

action 015    cli command "configure term"

action 020    cli command "interface serial1/0"

action 025    cli command "shut"

action 030   else

action 035    cli command "enable"

action 040    cli command "configure term"

action 045    cli command "interface serial1/0"

action 050    cli command "no sh"

action 085   end

View solution in original post

6 Replies 6

Joe Clarke
Cisco Employee
Cisco Employee

This applet is overcomplicated for what you want to do, plus you have a typo on your interface line.  Try this:

event manager applet LOSS

event ipsla operation-id 10 reaction-type timeout

action 005   if $_ipsla_condition eq "Occurred"

action 010    cli command "enable"

action 015    cli command "configure term"

action 020    cli command "interface serial1/0"

action 025    cli command "shut"

action 030   else

action 035    cli command "enable"

action 040    cli command "configure term"

action 045    cli command "interface serial1/0"

action 050    cli command "no sh"

action 085   end

Hi Joseph,

This applet also didnt work. Enabled debug event manager detector cli but couldnt see any logs. Have a doubt in action 005, in if else block have used eq "Occured" is this predefined ?

ip sla 10

icmp-echo 20.0.0.2 source-ip 20.0.0.1

ip sla schedule 10 life forever start-time now

ip sla reaction-configuration 10 react timeout threshold-type immediate action-type trapAndTrigger

event manager applet LOSS

event ipsla operation-id 10 reaction-type timeout

action 005 if $_ipsla_condition eq Occured

action 010  cli command "enable"

action 015  cli command "configure term"

action 020  cli command "interface serial1/0"

action 025  cli command "shut"

action 030 else

action 035  cli command "enable"

action 040  cli command "configure term"

action 045  cli command "interface serial1/0"

action 050  cli command "no sh"

action 085 end

Yes, it's defined, but Occurred is misspelled.  You forgot the second 'r'.  If you want to see the CLI executed, you need to enable "debug event manager action cli".

oh!! Thank you

Hello,
Can you tell me if this procedure works on Cisco IOS XE Software, Version 17.03.02a?

I'm trying to execute the command as instructed in this post, but nothing happens, the interface that I configured to be in "shutdown" does not present this state.

script I'm using:

 

event manager applet INTERFACE_UP_DOWN

event ipsla operation-id 1 reaction-type timeout

action 001 if $_ipsla_condition eq "Occurred"

action 002 cli command "enable"

action 003 cli command "configure term"

action 004 cli command "interface gi2/6/0/31"

action 005 cli command "shut"

action 006 else

action 007 cli command "enable"

action 008 cli command "configure term"

action 009 cli command "interface gi2/6/0/31"

action 010 cli command "no sh"

action 011 cli end

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:

Innovations in Cisco Full Stack Observability - A new webinar from Cisco