cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1160
Views
0
Helpful
1
Replies

Problem with IP SLA + EEM

bgp.ripe901
Level 1
Level 1

Hello !

Please tell me where the mistake:

##

ip sla 10
icmp-echo 8.8.8.8 source-interface Cellular0
frequency 360
ip sla schedule 10 life forever start-time now

track 10 ip sla 10 reachability
delay down 20 up 20

ip sla schedule 10 life forever start-time now

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

ip sla enable reaction-alerts

##

event manager applet ISPCheck
event ipsla operation-id 10 reaction-type timeout
action 1.0 if $_ipsla_condition eq "Occurred"
action 1.1 syslog msg "Inet slot 0 DOWN"
action 1.2 cli command "clear interface cellular 0"
action 1.3 cli command "cellular 0 lte sim activate slot 1"
action 1.4 else
action 1.5 syslog msg "IP SLA OK"
action 1.6 end

###

new_X#sh ip sla sta 10
IPSLAs Latest Operation Statistics

IPSLA operation id: 10
Latest RTT: NoConnection/Busy/Timeout
Latest operation start time: 09:52:19 UTC Thu Dec 10 2015
Latest operation return code: Timeout
Number of successes: 0
Number of failures: 16
Operation time to live: Forever

###

IOS : Version 15.4(3)M4, RELEASE SOFTWARE (fc1)

Version 2:

track 100 ip sla 100 reachability

ip sla 100
icmp-echo 8.8.8.8 source-interface Cellular0
frequency 360
timeout 15000
ip sla schedule 100 life forever start-time now

##

event manager applet 3G-FAIL

event track 100 state down

action 1.1 if $_track_state eq "down"

action 1.2 cli command "enable"

action 1.3 cli command "clear interface cellular 0"

action 1.4 cli command "cellular 0 lte sim activate slot 1"

action 1.6 end

###

Both versions my scripts do not work !

1 Reply 1

bgp.ripe901
Level 1
Level 1

It does not work:

event manager applet IP-CHANGE
event none
action 1.1 cli command "ping 8.8.8.8 source cellular 0"
action 1.3 regexp "(\!\!\!\!)" "$_cli_result" _match
action 1.4 if $_regexp_result eq "1"
action 1.5 exit
action 1.6 else
action 1.7 syslog priority alerts msg "Ping Failed !"
action 1.8 cli command "cellular 0 lte sim activate slot 1"
action 2.0 exit