cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements

556
Views
0
Helpful
7
Replies

EEM with IP SLA - Cisco CGR1240

I have the IP SLA icmp-jitter that test the APN and trigger EEM when loss 20/50 packets, but now when I upgrade CGR from 15.6(3)M2 to 15.7(1)M1 the EEM doesn't work.

Basically, the EEM do this:

1 - Turn off the IP SLA X (11 or 21)

2 - Commute the SLOT (0 or 1) on module 4G

3 - Turn on the IP SLA X (11 or 21) - IT'S NOT WORKING

Please, anyone can help me?

 

Follow the configuration:

 

ip sla 11
icmp-jitter 10.76.8.29 num-packets 50 interval 60000
frequency 3600

!
ip sla 21
icmp-jitter 10.76.8.29 num-packets 50 interval 60000
frequency 3600

!

event manager applet CELL_MONITOR_SLOT0 trap authorization bypass
event syslog pattern "IP SLAs\(11\): Threshold exceeded"
action 1.0 syslog msg "REDE CELULAR INSTAVEL - MUDANDO PARA REDE CELULAR SLOT1"
action 1.5 cli command "enable"
action 2.0 cli command "config t"
action 3.5 cli command "controller Cellular 3/1"
action 4.0 cli command "lte sim primary slot 1"
action 4.5 cli command "no ip sla schedule 11 life forever start-time now"
action 5.0 cli command "no ip sla reaction-configuration 11 react packetLoss threshold-value 20 2 threshold-type immediate action-type trapOnly"
action 5.1 wait 300
action 5.5 cli command "ip sla schedule 21 life forever start-time now"
action 6.0 cli command "ip sla reaction-configuration 21 react packetLoss threshold-value 20 2 threshold-type immediate action-type trapOnly"

!

event manager applet CELL_MONITOR_SLOT1 trap authorization bypass
event syslog pattern "IP SLAs\(21\): Threshold exceeded"
action 1.0 syslog msg "REDE CELULAR INSTAVEL - MUDANDO PARA REDE CELULAR SLOT0"
action 1.5 cli command "enable"
action 2.0 cli command "config t"
action 3.5 cli command "controller Cellular 3/1"
action 4.0 cli command "lte sim primary slot 0"
action 4.5 cli command "no ip sla schedule 21 life forever start-time now"
action 5.0 cli command "no ip sla reaction-configuration 21 react packetLoss threshold-value 20 2 threshold-type immediate action-type trapOnly"
action 5.1 wait 300
action 5.5 cli command "ip sla schedule 11 life forever start-time now"
action 6.0 cli command "ip sla reaction-configuration 11 react packetLoss threshold-value 20 2 threshold-type immediate action-type trapOnly"

7 REPLIES 7
Hall of Fame Cisco Employee

Re: EEM with IP SLA - Cisco CGR1240

I don't know how this ever worked since you have a 300 second sleep time in here, but the applets will terminate after 20 seconds of runtime.  If you want to introduce arbitrary delays in your policies, consider using How To Introduce Large Delays In EEM Policies .  Else you'd need at least a 320 second maxrun timer.

Re: EEM with IP SLA - Cisco CGR1240

Hello Joe,

 

Thanks for your help.

If I understood I just change the commando wait, follow:

 

FROM:

 

action 5.1 wait 300

 

TO:

 

action 5.1 cli command "event timer countdown time 300"

 

It's ok?

Hall of Fame Cisco Employee

Re: EEM with IP SLA - Cisco CGR1240

No, it's more involved than that.  You need to create a nested policy with the countdown timer.  You need to create the new, nested applet within your top-level applet, specify the event as you've shown, then enable, enter config mode, and configure the new ip sla commands (remember to use the $q to stand for the double quotes).

Re: EEM with IP SLA - Cisco CGR1240

Hello Joe,

 

I read again your link and use your recommendation, please can you check:

 

!
event manager environment q "
!
event manager applet CELL_MONITOR_SLOT0 trap authorization bypass
event syslog pattern "IP SLAs\(11\): Threshold exceeded"
action 1.0 syslog msg "REDE CELULAR INSTAVEL - MUDANDO PARA REDE CELULAR SLOT1"
action 1.5 cli command "enable"
action 2.0 cli command "config t"
action 3.5 cli command "controller Cellular 3/1"
action 4.0 cli command "lte sim primary slot 1"
action 4.5 cli command "no ip sla schedule 11 life forever start-time now"
action 5.0 cli command "no ip sla reaction-configuration 11 react packetLoss threshold-value 20 2 threshold-type immediate action-type trapOnly"
action 5.1 cli command "event manager applet wait-timer_SLOT0"
action 5.2 cli command "event timer countdown time 300"
action 5.5 cli command $q ip sla schedule 21 life forever start-time now$q"
action 6.0 cli command $q ip sla reaction-configuration 21 react packetLoss threshold-value 20 2 threshold-type immediate action-type trapOnly$q"
!
event manager applet CELL_MONITOR_SLOT1 trap authorization bypass
event syslog pattern "IP SLAs\(21\): Threshold exceeded"
action 1.0 syslog msg "REDE CELULAR INSTAVEL - MUDANDO PARA REDE CELULAR SLOT0"
action 1.5 cli command "enable"
action 2.0 cli command "config t"
action 3.5 cli command "controller Cellular 3/1"
action 4.0 cli command "lte sim primary slot 0"
action 4.5 cli command "no ip sla schedule 21 life forever start-time now"
action 5.0 cli command "no ip sla reaction-configuration 21 react packetLoss threshold-value 20 2 threshold-type immediate action-type trapOnly"
action 5.1 cli command "event manager applet wait-timer_SLOT1"
action 5.2 cli command "event timer countdown time 300"
action 5.5 cli command $q ip sla schedule 11 life forever start-time now$q"
action 6.0 cli command $q ip sla reaction-configuration 11 react packetLoss threshold-value 20 2 threshold-type immediate action-type trapOnly$q"
!
event manager applet wait-timer_SLOT0
action 1.0 cli command "event timer countdown time 300"
action 2.0 cli command " ip sla schedule 21 life forever start-time now"
action 3.0 cli command " ip sla reaction-configuration 21 react packetLoss threshold-value 20 2 threshold-type immediate action-type trapOnly"
!
event manager applet wait-timer_SLOT1
action 1.0 cli command "event timer countdown time 300"
action 2.0 cli command " ip sla schedule 11 life forever start-time now"
action 3.0 cli command " ip sla reaction-configuration 11 react packetLoss threshold-value 20 2 threshold-type immediate action-type trapOnly"
!

Hall of Fame Cisco Employee

Re: EEM with IP SLA - Cisco CGR1240

You need to have nested actions:

 

action 5.3 cli command "action 1.0 cli command enable"

action 5.4 cli command "action 2.0 cli command $q config t$q"

action 5.5 cli command "action 3.0 cli command $q ip sla schedule 21 life forever start-time now$q"
action 6.0 cli command "action 4.0 cli command $q ip sla reaction-configuration 21 react packetLoss threshold-value 20 2 threshold-type immediate action-type trapOnly$q"

 

You also need to unconfigure your nested applets when done:

 

action 6.1 cli command "action 5.0 cli command $q no event manager applet wait-timer_SLOT0$q"

 

And you should never configure the nested applets by hand as top-level applets.  EEM will do that for you.

Highlighted

Re: EEM with IP SLA - Cisco CGR1240

Joe,

 

Thanks for your support. So I applied your sugestion but it still not working, please can you check the script? 

 

event manager applet Test_CELL_MONITOR_SLOT0 trap authorization bypass
event syslog pattern "IP SLAs\(31\): Threshold exceeded"
action 1.0 syslog msg "REDE CELULAR INSTAVEL - MUDANDO PARA REDE CELULAR SLOT1"
action 1.5 cli command "enable"
action 2.0 cli command "config t"
action 3.5 cli command "interface gig 2/2"
action 4.0 cli command "description SLOT1"
action 4.5 cli command "no ip sla schedule 31 life forever start-time now"
action 5.0 cli command "no ip sla reaction-configuration 31 react packetLoss threshold-value 4 1 threshold-type immediate action-type trapOnly"
action 5.1 cli command "event manager applet wait-timer_SLOT1"
action 5.2 cli command "event timer countdown time 300"
action 5.3 cli command "action 1.0 cli command enable"
action 5.4 cli command "action 2.0 cli command $q config t$q"
action 5.5 cli command "action 3.0 cli command $q ip sla schedule 41 life forever start-time now$q"
action 5.6 cli command "action 4.0 cli command $q ip sla reaction-configuration 41 react packetLoss threshold-value 4 1 threshold-type immediate action-type trapOnly$q"
action 5.7 cli command "action 5.0 cli command $q no event manager applet wait-timer_SLOT0$q"
action 5.8 cli command "action 6.0 cli command end"

!
event manager applet Test_CELL_MONITOR_SLOT1 trap authorization bypass
event syslog pattern "IP SLAs\(41\): Threshold exceeded"
action 1.0 syslog msg "REDE CELULAR INSTAVEL - MUDANDO PARA REDE CELULAR SLOT0"
action 1.5 cli command "enable"
action 2.0 cli command "config t"
action 3.5 cli command "interface gig 2/2"
action 4.0 cli command "description change SLOT0"
action 4.5 cli command "no ip sla schedule 41 life forever start-time now"
action 5.0 cli command "no ip sla reaction-configuration 41 react packetLoss threshold-value 4 1 threshold-type immediate action-type trapOnly"
action 5.1 cli command "event manager applet wait-timer_SLOT0"
action 5.2 cli command "event timer countdown time 300"
action 5.3 cli command "action 1.0 cli command enable"
action 5.4 cli command "action 2.0 cli command $q config t$q"
action 5.5 cli command "action 3.0 cli command $q ip sla schedule 31 life forever start-time now$q"
action 5.6 cli command "action 4.0 cli command $q ip sla reaction-configuration 31 react packetLoss threshold-value 4 1 threshold-type immediate action-type trapOnly$q"
action 5.7 cli command "action 5.0 cli command $q no event manager applet wait-timer_SLOT1$q"
action 5.8 cli command "action 6.0 cli command end"
!
event manager applet wait-timer_SLOT0
event timer countdown time 300
action 1.0 cli command "enable"
action 2.0 cli command " config t"
action 3.0 cli command " ip sla schedule 31 life forever start-time now"
action 4.0 cli command " ip sla reaction-configuration 31 react packetLoss threshold-value 4 1 threshold-type immediate action-type trapOnly"
action 5.0 cli command " no event manager applet wait-timer_SLOT0"
action 6.0 cli command "end"

!
event manager applet wait-timer_SLOT1
event timer countdown time 300
action 1.0 cli command "enable"
action 2.0 cli command " config t"
action 3.0 cli command " ip sla schedule 41 life forever start-time now"
action 4.0 cli command " ip sla reaction-configuration 41 react packetLoss threshold-value 4 1 threshold-type immediate action-type trapOnly"
action 5.0 cli command " no event manager applet wait-timer_SLOT1"
action 6.0 cli command "end"

Hall of Fame Cisco Employee

Re: EEM with IP SLA - Cisco CGR1240

What's not working?  The nested policies are being added to the config.  If they are not running correctly, you may need to add auth bypass to those applets as well when you configure them within the top-level applets.  As they're configured now, they're trying to use AAA authz.

CreatePlease to create content
Content for Community-Ad
July's Community Spotlight Awards