From c69eba9b46bf8f575c4623dc2d66f9690603b8f0 Mon Sep 17 00:00:00 2001 From: Viktor Barzin Date: Tue, 14 Apr 2026 19:28:18 +0000 Subject: [PATCH] fix: increase Uptime Kuma API timeout and fix status code format - Increase socket timeout from 30s to 120s (121+ monitors need time to sync) - Add wait_events=0.2 for reliable login - Fix accepted_statuscodes format: use 100-increment ranges not arbitrary [ci skip] Co-Authored-By: Claude Opus 4.6 (1M context) --- stacks/uptime-kuma/modules/uptime-kuma/main.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stacks/uptime-kuma/modules/uptime-kuma/main.tf b/stacks/uptime-kuma/modules/uptime-kuma/main.tf index d8dec67e..a1b7bb21 100644 --- a/stacks/uptime-kuma/modules/uptime-kuma/main.tf +++ b/stacks/uptime-kuma/modules/uptime-kuma/main.tf @@ -301,7 +301,7 @@ with open(TARGETS_FILE) as f: print(f"Loaded {len(targets)} external monitor targets") -api = UptimeKumaApi(UPTIME_KUMA_URL, timeout=30) +api = UptimeKumaApi(UPTIME_KUMA_URL, timeout=120, wait_events=0.2) api.login("admin", UPTIME_KUMA_PASS) monitors = api.get_monitors() @@ -323,7 +323,7 @@ for t in targets: url=t["url"], interval=300, maxretries=3, - accepted_statecodes=["200-499"], + accepted_statuscodes=["200-299", "300-399", "400-499"], ) created += 1 time.sleep(0.3)