From 518f54394cf0104f842260a3f99407d6db88d10b Mon Sep 17 00:00:00 2001 From: Justin Oros Date: Wed, 22 Apr 2026 08:52:15 -0700 Subject: [PATCH] health-check.sh: only check last 60 seconds of autossh logs for tunnel failures to avoid false positives from old log entries --- health-check.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/health-check.sh b/health-check.sh index 08c8f21..32bf594 100755 --- a/health-check.sh +++ b/health-check.sh @@ -121,7 +121,7 @@ check_spoke() { ok "autossh container running ($autossh_container)" local logs - logs=$(docker logs "$autossh_container" 2>&1 | tail -20 || true) + logs=$(docker logs "$autossh_container" --since 60s 2>&1 || true) if echo "$logs" | grep -q "remote port forwarding failed"; then fail "Tunnel reports port forwarding failed — check hub authorized_keys" else @@ -206,7 +206,7 @@ check_hub() { fail "rclone remote [${spoke_name}-remote] not found in rclone.conf" fi - if crontab -u "$(basename "$HUB_HOME")" -l 2>/dev/null | grep -q "${spoke_name}-remote:"; then + if crontab -u "$(basename "$HUB_HOME")" -l 2>/dev/null | grep -qE "${spoke_name}-remote:|mount-${spoke_name}"; then ok "Auto-mount crontab entry present" else warn "No auto-mount crontab entry for $spoke_name"