From ff7f95e1bb019b036c9725fd99132a39fa715695 Mon Sep 17 00:00:00 2001 From: narawat lamaiin Date: Fri, 20 Mar 2026 14:48:06 +0700 Subject: [PATCH] update --- check_and_reboot_state.json | 2 +- check_router_reboot.jl | 74 ++++++++------- check_router_reboot_log.txt | 180 ++++++++++++++++++------------------ 3 files changed, 132 insertions(+), 124 deletions(-) diff --git a/check_and_reboot_state.json b/check_and_reboot_state.json index d713ae4..42dcf12 100644 --- a/check_and_reboot_state.json +++ b/check_and_reboot_state.json @@ -1 +1 @@ -{"last_reboot_datetime":"2026-03-20T10:49:28.411","consecutive_fails":0} \ No newline at end of file +{"last_reboot_datetime":"2026-03-20T14:46:18.848","consecutive_fails":0} \ No newline at end of file diff --git a/check_router_reboot.jl b/check_router_reboot.jl index 5099c0b..6fa08d4 100644 --- a/check_router_reboot.jl +++ b/check_router_reboot.jl @@ -19,14 +19,15 @@ const TIMEOUT_SECS = 30 # request timeout const ATTEMPTS_PER_CHECK = 1 # number of ping attempts per check const BACKOFF_BETWEEN_ATTEMPTS = 1 # seconds between ping attempts const FAILS_TO_REBOOT = 3 # consecutive failed checks required to trigger reboot -const COOLDOWN_AFTER_REBOOT_SECS = 600 # do not reboot again within this many seconds -const DRY_RUN = false # set false to actually reboot +const COOLDOWN_AFTER_REBOOT_SECS = 120 # do not reboot again within this many seconds +const DRY_RUN = true # set false to actually reboot const CHECK_INTERVAL_SECS = 60 # run a check every CHECK_INTERVAL_SECS seconds const thisFolderPath = @__DIR__ +const thisFilePath = @__FILE__ const LogFilePath = "$thisFolderPath/check_router_reboot_log.txt" # write logs here and also broadcast const StateFilePath = "$thisFolderPath/check_and_reboot_state.json" - +# println(0) # Simple broadcast helper # Simple broadcast helper (safe Cmd construction) function broadcast_msg(msg::AbstractString) @@ -226,12 +227,12 @@ end # Single check iteration function perform_check!(st::State) - + # println(1) success = false last_result = nothing for i in 1:ATTEMPTS_PER_CHECK - ok, result = check_router_once(ROUTER_IP) - # ok, result = values(JSON.parsefile("test_ping_result.json")) # for testing without actual ping + # ok, result = check_router_once(ROUTER_IP) + ok, result = values(JSON.parsefile("/home/ton/docker-programs/check_and_reboot/test_ping_result.json")) # for testing without actual ping if ok success = true break @@ -244,13 +245,14 @@ function perform_check!(st::State) in_cooldown = false if st.last_reboot_datetime !== nothing timepass = ((Dates.now() - st.last_reboot_datetime).value / 1000) |> floor |> Int - if timepass < COOLDOWN_AFTER_REBOOT_SECS in_cooldown = true end end - + # @show in_cooldown + # println(2) if in_cooldown + # println("2-1") # During cooldown, track failures but don't trigger reboot yet if success broadcast_msg("Broadcasting from file: $thisFilePath") @@ -258,6 +260,7 @@ function perform_check!(st::State) st.consecutive_fails = 0 save_state(st, StateFilePath) else + # println("2-2") st.consecutive_fails += 1 broadcast_msg("Broadcasting from file: $thisFilePath") logmsg("$ROUTER_IP is unreachable during cooldown. Consecutive fails: $(st.consecutive_fails)/$FAILS_TO_REBOOT.") @@ -265,37 +268,44 @@ function perform_check!(st::State) end return end - + # println(3) # Outside cooldown - full check with potential reboot if success - if st.consecutive_fails > 0 - logmsg("$ROUTER_IP is reachable; resetting consecutive failure counter.") - else - # logmsg("$ROUTER_IP is reachable.") - end - st.consecutive_fails = 0 - save_state(st, StateFilePath) - return + # println("3-1") + if st.consecutive_fails > 0 + # println("3-2") + logmsg("$ROUTER_IP is reachable; resetting consecutive failure counter.") + else + # logmsg("$ROUTER_IP is reachable.") + end + st.consecutive_fails = 0 + save_state(st, StateFilePath) + return else - st.consecutive_fails += 1 - broadcast_msg("Broadcasting from file: $thisFilePath") - logmsg("$ROUTER_IP is unreachable (last result: $routerresult). Consecutive fails: $(st.consecutive_fails)/$FAILS_TO_REBOOT.") - save_state(st, StateFilePath) + st.consecutive_fails += 1 + broadcast_msg("Broadcasting from file: $thisFilePath") + logmsg("$ROUTER_IP is unreachable (last result: $routerresult). Consecutive fails: $(st.consecutive_fails)/$FAILS_TO_REBOOT.") + save_state(st, StateFilePath) end + # println(4) if st.consecutive_fails >= FAILS_TO_REBOOT + # println("4-1") + save_state(st, StateFilePath) + ok = do_reboot() + if ok + # println("4-2") + broadcast_msg("Broadcasting from file: $thisFilePath") + logmsg("Reboot executed (or simulated). Resetting failure counter.") + st.consecutive_fails = 0 + st.last_reboot_datetime = Dates.now() + @show st + @show StateFilePath save_state(st, StateFilePath) - ok = do_reboot() - if ok - thisFilePath = @__FILE__ - broadcast_msg("Broadcasting from file: $thisFilePath") - logmsg("Reboot executed (or simulated). Resetting failure counter.") - st.consecutive_fails = 0 - st.last_reboot_datetime = Dates.now() - save_state(st, StateFilePath) - else - logmsg("Reboot attempt failed; will retry after next interval.") - end + else + logmsg("Reboot attempt failed; will retry after next interval.") + end end + # println(5) end diff --git a/check_router_reboot_log.txt b/check_router_reboot_log.txt index 7ee8069..e85e30a 100644 --- a/check_router_reboot_log.txt +++ b/check_router_reboot_log.txt @@ -1,94 +1,3 @@ -[2026-03-20T08:24:02.098] Starting check loop. Checking router 192.168.88.1 every 60 seconds. -[2026-03-20T08:24:06.510] 192.168.88.1 is unreachable during cooldown. Consecutive fails: 1/3. -[2026-03-20T08:25:10.722] 192.168.88.1 is unreachable during cooldown. Consecutive fails: 2/3. -[2026-03-20T08:26:14.850] 192.168.88.1 is unreachable during cooldown. Consecutive fails: 3/3. -[2026-03-20T08:26:14.851] Cooldown has expired and router is still unreachable. Triggering reboot. -[2026-03-20T08:26:14.862] Executing reboot command: /bin/systemctl reboot -[2026-03-20T08:26:14.869] Reboot executed (or simulated). Resetting failure counter. -[2026-03-20T08:27:50.027] Starting check loop. Checking router 192.168.88.1 every 60 seconds. -[2026-03-20T08:27:54.438] 192.168.88.1 is unreachable during cooldown. Consecutive fails: 1/3. -[2026-03-20T08:28:58.658] 192.168.88.1 is unreachable during cooldown. Consecutive fails: 2/3. -[2026-03-20T08:30:02.786] 192.168.88.1 is unreachable during cooldown. Consecutive fails: 3/3. -[2026-03-20T08:30:02.787] Cooldown has expired and router is still unreachable. Triggering reboot. -[2026-03-20T08:30:02.797] Executing reboot command: /bin/systemctl reboot -[2026-03-20T08:30:02.804] Reboot executed (or simulated). Resetting failure counter. -[2026-03-20T08:31:38.059] Starting check loop. Checking router 192.168.88.1 every 60 seconds. -[2026-03-20T08:31:42.504] 192.168.88.1 is unreachable during cooldown. Consecutive fails: 1/3. -[2026-03-20T08:32:46.784] 192.168.88.1 is unreachable during cooldown. Consecutive fails: 2/3. -[2026-03-20T08:33:50.912] 192.168.88.1 is unreachable during cooldown. Consecutive fails: 3/3. -[2026-03-20T08:33:50.912] Cooldown has expired and router is still unreachable. Triggering reboot. -[2026-03-20T08:33:50.923] Executing reboot command: /bin/systemctl reboot -[2026-03-20T08:33:50.930] Reboot executed (or simulated). Resetting failure counter. -[2026-03-20T08:35:25.114] Starting check loop. Checking router 192.168.88.1 every 60 seconds. -[2026-03-20T08:35:29.577] 192.168.88.1 is unreachable during cooldown. Consecutive fails: 1/3. -[2026-03-20T08:36:33.792] 192.168.88.1 is unreachable during cooldown. Consecutive fails: 2/3. -[2026-03-20T08:37:37.920] 192.168.88.1 is unreachable during cooldown. Consecutive fails: 3/3. -[2026-03-20T08:37:37.952] Cooldown has expired and router is still unreachable. Triggering reboot. -[2026-03-20T08:37:37.962] Executing reboot command: /bin/systemctl reboot -[2026-03-20T08:37:37.969] Reboot executed (or simulated). Resetting failure counter. -[2026-03-20T08:39:12.910] Starting check loop. Checking router 192.168.88.1 every 60 seconds. -[2026-03-20T08:39:17.371] 192.168.88.1 is unreachable during cooldown. Consecutive fails: 1/3. -[2026-03-20T08:40:21.592] 192.168.88.1 is unreachable during cooldown. Consecutive fails: 2/3. -[2026-03-20T08:41:25.719] 192.168.88.1 is unreachable during cooldown. Consecutive fails: 3/3. -[2026-03-20T08:41:25.720] Cooldown has expired and router is still unreachable. Triggering reboot. -[2026-03-20T08:41:25.731] Executing reboot command: /bin/systemctl reboot -[2026-03-20T08:41:25.738] Reboot executed (or simulated). Resetting failure counter. -[2026-03-20T08:43:02.074] Starting check loop. Checking router 192.168.88.1 every 60 seconds. -[2026-03-20T08:43:06.506] 192.168.88.1 is unreachable during cooldown. Consecutive fails: 1/3. -[2026-03-20T08:44:10.719] 192.168.88.1 is unreachable during cooldown. Consecutive fails: 2/3. -[2026-03-20T08:45:14.847] 192.168.88.1 is unreachable during cooldown. Consecutive fails: 3/3. -[2026-03-20T08:45:14.848] Cooldown has expired and router is still unreachable. Triggering reboot. -[2026-03-20T08:45:14.859] Executing reboot command: /bin/systemctl reboot -[2026-03-20T08:45:14.866] Reboot executed (or simulated). Resetting failure counter. -[2026-03-20T08:46:49.831] Starting check loop. Checking router 192.168.88.1 every 60 seconds. -[2026-03-20T08:46:54.237] 192.168.88.1 is unreachable during cooldown. Consecutive fails: 1/3. -[2026-03-20T08:47:58.458] 192.168.88.1 is unreachable during cooldown. Consecutive fails: 2/3. -[2026-03-20T08:49:02.586] 192.168.88.1 is unreachable during cooldown. Consecutive fails: 3/3. -[2026-03-20T08:49:02.586] Cooldown has expired and router is still unreachable. Triggering reboot. -[2026-03-20T08:49:02.597] Executing reboot command: /bin/systemctl reboot -[2026-03-20T08:49:02.604] Reboot executed (or simulated). Resetting failure counter. -[2026-03-20T08:50:37.054] Starting check loop. Checking router 192.168.88.1 every 60 seconds. -[2026-03-20T08:50:41.498] 192.168.88.1 is unreachable during cooldown. Consecutive fails: 1/3. -[2026-03-20T08:51:45.720] 192.168.88.1 is unreachable during cooldown. Consecutive fails: 2/3. -[2026-03-20T08:52:49.848] 192.168.88.1 is unreachable during cooldown. Consecutive fails: 3/3. -[2026-03-20T08:52:49.849] Cooldown has expired and router is still unreachable. Triggering reboot. -[2026-03-20T08:52:49.859] Executing reboot command: /bin/systemctl reboot -[2026-03-20T08:52:49.867] Reboot executed (or simulated). Resetting failure counter. -[2026-03-20T08:54:24.890] Starting check loop. Checking router 192.168.88.1 every 60 seconds. -[2026-03-20T08:54:29.366] 192.168.88.1 is unreachable during cooldown. Consecutive fails: 1/3. -[2026-03-20T08:55:33.590] 192.168.88.1 is unreachable during cooldown. Consecutive fails: 2/3. -[2026-03-20T08:56:37.653] 192.168.88.1 is unreachable during cooldown. Consecutive fails: 3/3. -[2026-03-20T08:56:37.654] Cooldown has expired and router is still unreachable. Triggering reboot. -[2026-03-20T08:56:37.666] Executing reboot command: /bin/systemctl reboot -[2026-03-20T08:56:37.673] Reboot executed (or simulated). Resetting failure counter. -[2026-03-20T08:58:14.067] Starting check loop. Checking router 192.168.88.1 every 60 seconds. -[2026-03-20T08:58:14.202] 192.168.88.1 is reachable during cooldown. Router is back online! Resetting state. -[2026-03-20T08:59:14.320] 192.168.88.1 is reachable during cooldown. Router is back online! Resetting state. -[2026-03-20T09:00:14.415] 192.168.88.1 is reachable during cooldown. Router is back online! Resetting state. -[2026-03-20T09:01:14.477] 192.168.88.1 is reachable during cooldown. Router is back online! Resetting state. -[2026-03-20T09:02:14.534] 192.168.88.1 is reachable during cooldown. Router is back online! Resetting state. -[2026-03-20T09:03:14.597] 192.168.88.1 is reachable during cooldown. Router is back online! Resetting state. -[2026-03-20T09:04:14.660] 192.168.88.1 is reachable during cooldown. Router is back online! Resetting state. -[2026-03-20T09:05:14.722] 192.168.88.1 is reachable during cooldown. Router is back online! Resetting state. -[2026-03-20T09:06:14.784] 192.168.88.1 is reachable during cooldown. Router is back online! Resetting state. -[2026-03-20T10:35:51.399] Starting check loop. Checking router 192.168.88.1 every 60 seconds. -[2026-03-20T10:36:57.651] 192.168.88.1 is unreachable (last result: no response). Consecutive fails: 1/3. -[2026-03-20T10:38:01.299] 192.168.88.1 is unreachable (last result: no response). Consecutive fails: 2/3. -[2026-03-20T10:39:02.580] 192.168.88.1 is unreachable (last result: no response). Consecutive fails: 3/3. -[2026-03-20T10:39:02.830] Executing reboot command: /bin/systemctl reboot -[2026-03-20T10:39:02.943] Reboot executed (or simulated). Resetting failure counter. -[2026-03-20T10:40:30.096] Starting check loop. Checking router 192.168.88.1 every 60 seconds. -[2026-03-20T10:40:32.940] 192.168.88.1 is unreachable during cooldown. Consecutive fails: 1/3. -[2026-03-20T10:41:34.658] 192.168.88.1 is unreachable during cooldown. Consecutive fails: 2/3. -[2026-03-20T10:42:35.734] 192.168.88.1 is unreachable during cooldown. Consecutive fails: 3/3. -[2026-03-20T10:42:35.738] Cooldown has expired and router is still unreachable. Triggering reboot. -[2026-03-20T10:42:35.839] Executing reboot command: /bin/systemctl reboot -[2026-03-20T10:42:35.917] Reboot executed (or simulated). Resetting failure counter. -[2026-03-20T10:43:57.053] Starting check loop. Checking router 192.168.88.1 every 60 seconds. -[2026-03-20T10:43:59.937] 192.168.88.1 is unreachable during cooldown. Consecutive fails: 1/3. -[2026-03-20T10:45:01.576] 192.168.88.1 is unreachable during cooldown. Consecutive fails: 2/3. -[2026-03-20T10:46:02.604] 192.168.88.1 is unreachable during cooldown. Consecutive fails: 3/3. -[2026-03-20T10:46:02.608] Cooldown has expired and router is still unreachable. Triggering reboot. [2026-03-20T10:46:02.700] Executing reboot command: /bin/systemctl reboot [2026-03-20T10:46:02.900] Reboot executed (or simulated). Resetting failure counter. [2026-03-20T10:47:22.509] Starting check loop. Checking router 192.168.88.1 every 60 seconds. @@ -108,3 +17,92 @@ [2026-03-20T10:56:51.025] 192.168.88.1 is reachable during cooldown. Router is back online! Resetting state. [2026-03-20T10:57:51.056] 192.168.88.1 is reachable during cooldown. Router is back online! Resetting state. [2026-03-20T10:58:51.132] 192.168.88.1 is reachable during cooldown. Router is back online! Resetting state. +[2026-03-20T11:04:22.285] Starting check loop. Checking router 192.168.88.1 every 60 seconds. +[2026-03-20T11:10:08.650] Starting check loop. Checking router 192.168.88.1 every 60 seconds. +[2026-03-20T11:10:10.725] Error during check: UndefVarError(:thisFilePath, 0x000000000000975f, :local) +[2026-03-20T11:12:40.556] Starting check loop. Checking router 192.168.88.1 every 60 seconds. +[2026-03-20T11:12:43.912] Error during check: SystemError("opening file \"test_ping_result.json\"", 2, nothing) +[2026-03-20T12:42:13.923] Starting check loop. Checking router 192.168.88.1 every 60 seconds. +[2026-03-20T12:42:15.861] Error during check: UndefVarError(:thisFilePath, 0x000000000000975f, :local) +[2026-03-20T12:43:25.591] Starting check loop. Checking router 192.168.88.1 every 60 seconds. +[2026-03-20T12:43:27.556] Error during check: UndefVarError(:thisFilePath, 0x000000000000975f, :local) +[2026-03-20T12:44:06.281] Starting check loop. Checking router 192.168.88.1 every 60 seconds. +[2026-03-20T12:44:08.202] Error during check: UndefVarError(:thisFilePath, 0x000000000000975f, :local) +[2026-03-20T12:45:23.028] Starting check loop. Checking router 192.168.88.1 every 60 seconds. +[2026-03-20T12:45:24.799] 192.168.88.1 is unreachable (last result: no response). Consecutive fails: 1/3. +[2026-03-20T12:46:26.403] 192.168.88.1 is unreachable (last result: no response). Consecutive fails: 2/3. +[2026-03-20T12:47:27.427] 192.168.88.1 is unreachable (last result: no response). Consecutive fails: 3/3. +[2026-03-20T12:47:27.525] DRY RUN: would run reboot command: /usr/bin/sudo systemctl reboot +[2026-03-20T12:47:27.528] Reboot executed (or simulated). Resetting failure counter. +[2026-03-20T12:48:06.389] Starting check loop. Checking router 192.168.88.1 every 60 seconds. +[2026-03-20T12:48:08.162] 192.168.88.1 is unreachable (last result: no response). Consecutive fails: 1/3. +[2026-03-20T12:49:09.763] 192.168.88.1 is unreachable (last result: no response). Consecutive fails: 2/3. +[2026-03-20T12:50:10.833] 192.168.88.1 is unreachable (last result: no response). Consecutive fails: 3/3. +[2026-03-20T12:50:10.937] DRY RUN: would run reboot command: /usr/bin/sudo systemctl reboot +[2026-03-20T12:50:10.942] Reboot executed (or simulated). Resetting failure counter. +[2026-03-20T12:54:25.047] Starting check loop. Checking router 192.168.88.1 every 60 seconds. +[2026-03-20T12:54:26.823] 192.168.88.1 is unreachable (last result: no response). Consecutive fails: 1/3. +[2026-03-20T12:56:13.713] Starting check loop. Checking router 192.168.88.1 every 60 seconds. +[2026-03-20T12:56:15.487] 192.168.88.1 is unreachable (last result: no response). Consecutive fails: 1/3. +[2026-03-20T12:57:17.055] 192.168.88.1 is unreachable (last result: no response). Consecutive fails: 2/3. +[2026-03-20T12:58:18.125] 192.168.88.1 is unreachable (last result: no response). Consecutive fails: 3/3. +[2026-03-20T12:58:18.353] DRY RUN: would run reboot command: /usr/bin/sudo systemctl reboot +[2026-03-20T12:58:18.357] Reboot executed (or simulated). Resetting failure counter. +[2026-03-20T12:59:43.699] Starting check loop. Checking router 192.168.88.1 every 60 seconds. +[2026-03-20T12:59:45.472] 192.168.88.1 is unreachable (last result: no response). Consecutive fails: 1/3. +[2026-03-20T13:00:47.029] 192.168.88.1 is unreachable (last result: no response). Consecutive fails: 2/3. +[2026-03-20T13:01:48.056] 192.168.88.1 is unreachable (last result: no response). Consecutive fails: 3/3. +[2026-03-20T13:01:48.151] DRY RUN: would run reboot command: /usr/bin/sudo systemctl reboot +[2026-03-20T13:01:48.154] Reboot executed (or simulated). Resetting failure counter. +[2026-03-20T13:02:22.831] Starting check loop. Checking router 192.168.88.1 every 60 seconds. +[2026-03-20T13:02:24.606] 192.168.88.1 is unreachable during cooldown. Consecutive fails: 1/3. +[2026-03-20T13:03:06.170] Starting check loop. Checking router 192.168.88.1 every 60 seconds. +[2026-03-20T13:03:08.073] 192.168.88.1 is unreachable (last result: no response). Consecutive fails: 1/3. +[2026-03-20T13:06:43.902] Starting check loop. Checking router 192.168.88.1 every 60 seconds. +[2026-03-20T13:06:45.688] 192.168.88.1 is unreachable (last result: no response). Consecutive fails: 1/3. +[2026-03-20T13:20:26.911] Starting check loop. Checking router 192.168.88.1 every 60 seconds. +[2026-03-20T13:20:27.794] Error during check: SystemError("opening file \"test_ping_result.json\"", 2, nothing) +[2026-03-20T13:22:32.247] Starting check loop. Checking router 192.168.88.1 every 60 seconds. +[2026-03-20T13:22:34.026] 192.168.88.1 is unreachable (last result: no response). Consecutive fails: 1/3. +[2026-03-20T13:23:38.078] Starting check loop. Checking router 192.168.88.1 every 60 seconds. +[2026-03-20T13:23:39.856] 192.168.88.1 is unreachable (last result: no response). Consecutive fails: 2/3. +[2026-03-20T13:24:16.835] Starting check loop. Checking router 192.168.88.1 every 60 seconds. +[2026-03-20T13:24:18.606] 192.168.88.1 is unreachable (last result: no response). Consecutive fails: 3/3. +[2026-03-20T13:24:19.209] DRY RUN: would run reboot command: /usr/bin/sudo systemctl reboot +[2026-03-20T13:24:19.213] Reboot executed (or simulated). Resetting failure counter. +[2026-03-20T13:25:20.400] 192.168.88.1 is unreachable during cooldown. Consecutive fails: 1/3. +[2026-03-20T13:26:21.625] 192.168.88.1 is unreachable during cooldown. Consecutive fails: 2/3. +[2026-03-20T13:27:22.681] 192.168.88.1 is unreachable during cooldown. Consecutive fails: 3/3. +[2026-03-20T13:28:23.700] 192.168.88.1 is unreachable during cooldown. Consecutive fails: 4/3. +[2026-03-20T13:29:04.947] Starting check loop. Checking router 192.168.88.1 every 60 seconds. +[2026-03-20T13:29:06.721] 192.168.88.1 is unreachable during cooldown. Consecutive fails: 5/3. +[2026-03-20T14:32:48.752] Starting check loop. Checking router 192.168.88.1 every 60 seconds. +[2026-03-20T14:32:50.528] 192.168.88.1 is unreachable (last result: no response). Consecutive fails: 6/3. +[2026-03-20T14:32:51.123] DRY RUN: would run reboot command: /usr/bin/sudo systemctl reboot +[2026-03-20T14:32:51.128] Reboot executed (or simulated). Resetting failure counter. +[2026-03-20T14:33:52.347] 192.168.88.1 is unreachable during cooldown. Consecutive fails: 1/3. +[2026-03-20T14:34:53.367] 192.168.88.1 is unreachable (last result: no response). Consecutive fails: 2/3. +[2026-03-20T14:35:54.418] 192.168.88.1 is unreachable (last result: no response). Consecutive fails: 3/3. +[2026-03-20T14:35:54.452] DRY RUN: would run reboot command: /usr/bin/sudo systemctl reboot +[2026-03-20T14:35:54.455] Reboot executed (or simulated). Resetting failure counter. +[2026-03-20T14:36:55.528] 192.168.88.1 is unreachable during cooldown. Consecutive fails: 1/3. +[2026-03-20T14:38:00.916] Starting check loop. Checking router 192.168.88.1 every 60 seconds. +[2026-03-20T14:38:02.688] 192.168.88.1 is unreachable (last result: no response). Consecutive fails: 2/3. +[2026-03-20T14:39:04.303] 192.168.88.1 is unreachable (last result: no response). Consecutive fails: 3/3. +[2026-03-20T14:39:04.396] DRY RUN: would run reboot command: /usr/bin/sudo systemctl reboot +[2026-03-20T14:39:04.398] Reboot executed (or simulated). Resetting failure counter. +[2026-03-20T14:39:32.271] Starting check loop. Checking router 192.168.88.1 every 60 seconds. +[2026-03-20T14:39:34.046] 192.168.88.1 is unreachable during cooldown. Consecutive fails: 1/3. +[2026-03-20T14:40:27.209] Starting check loop. Checking router 192.168.88.1 every 60 seconds. +[2026-03-20T14:40:28.984] 192.168.88.1 is unreachable during cooldown. Consecutive fails: 2/3. +[2026-03-20T14:41:30.736] 192.168.88.1 is unreachable (last result: no response). Consecutive fails: 3/3. +[2026-03-20T14:41:30.836] DRY RUN: would run reboot command: /usr/bin/sudo systemctl reboot +[2026-03-20T14:41:30.839] Reboot executed (or simulated). Resetting failure counter. +[2026-03-20T14:42:13.075] Starting check loop. Checking router 192.168.88.1 every 60 seconds. +[2026-03-20T14:42:14.852] 192.168.88.1 is unreachable during cooldown. Consecutive fails: 1/3. +[2026-03-20T14:43:15.578] 192.168.88.1 is reachable during cooldown. Router is back online! Resetting state. +[2026-03-20T14:44:16.617] 192.168.88.1 is unreachable (last result: no response). Consecutive fails: 1/3. +[2026-03-20T14:45:17.675] 192.168.88.1 is unreachable (last result: no response). Consecutive fails: 2/3. +[2026-03-20T14:46:18.745] 192.168.88.1 is unreachable (last result: no response). Consecutive fails: 3/3. +[2026-03-20T14:46:18.841] DRY RUN: would run reboot command: /usr/bin/sudo systemctl reboot +[2026-03-20T14:46:18.844] Reboot executed (or simulated). Resetting failure counter.