06-23-2020 01:46 PM
please help me to make loop for EEM script below
1. if track 1 is down, start action commands
2. if track 1 is up, stop action commands
3. loop EEM below until track 1 is up
event manager applet 4GReset authorization bypass
event track 1 state down maxrun 30000000
action 1.0 wait 300
action 1.1 track read 1
action 1.2 if $_track_state eq up
action 1.3 puts "track is up"
action 1.4 else
action 1.5 cli command "enable"
action 1.6 wait 3
action 1.7 cli command "test cellular 0/1/0 modem-power-cycle"
action 1.8 wait 300
<while loop>
action 1.9 end
06-23-2020 02:20 PM
Have i missed anything here?
you script already tracking and if up take an action, you can also make another action based on the track item if down.
06-23-2020 03:50 PM
Hi Balaji
Thank you for your reply.
yes it is working to send action commands when Track is down over 5 min and stop action if track up within 5 min
but EEM is not working properly if track is still down after action command
for example, when track is down, EEM will wait 5 min to see Track status change. if track is down, it will send commands.
if track is up, it will stop.
but if track is still down, i want to keep send command every 5 to 10min so i need loop to repeat EEM until track is up
Thank you
Jae
06-24-2020 05:53 AM
Can you post full track / any SLA config along with some Logs track up and down to analyse and suggest better.
06-24-2020 02:26 PM
ip sla 1
icmp-echo x.x.x.x source-interface loopback0 <- use Core Lo IP
tos 160
frequency 30
ip sla schedule 1 life forever start now
track 1 ip sla 1 reachability
delay down 10 up 10
event manager applet 4GReset authorization bypass
event track 1 state down maxrun 30000000 <- check track status changes from up to down
action 1.0 wait 300 <- wait 5 min if track status changes from up to down
action 1.1 track read 1 <- read track 1 status
action 1.2 if $_track_state eq up <- if track is up, stop and put "track is up" below
action 1.3 puts "track is up"
action 1.4 else <- if not,
action 1.5 cli command "enable" <- send command
action 1.6 wait 3 <- wait
action 1.7 cli command "test cellular 0/1/0 modem-power-cycle" <- send command
action 1.8 wait 300 <- wait until 4G module reset
action 1.9 end
it is working but sometimes, we need to reset more than 1 time to get new parameter.
so after 1.8, i want to start process again from 1.0 if track is still down.
when track status changes to up, it will stop.
please advice me if we can make loop for this
Thank you
10-14-2021 01:40 AM - edited 10-14-2021 01:41 AM
Hi,
Did you every find a fix for this?
thanks
Simon
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide