From 14cd7a2a7e69f09a2e77d1f87b6c5781609e5ce1 Mon Sep 17 00:00:00 2001 From: orbitalo Date: Wed, 25 Mar 2026 18:04:03 +0000 Subject: [PATCH] fix(monitor): reduce Flugscanner health check retries/timeout (4x25s -> 2x10s) to prevent watchdog timeout --- homelab-ai-bot/monitor.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/homelab-ai-bot/monitor.py b/homelab-ai-bot/monitor.py index f80e85d0..629c2c3c 100644 --- a/homelab-ai-bot/monitor.py +++ b/homelab-ai-bot/monitor.py @@ -42,12 +42,11 @@ def _get_passwords(cfg): CRITICAL_CONTAINERS = [101, 109, 111, 112, 113, 115] HTTP_HEALTH_CHECKS = [ - # LAN-IPs direkt prüfen — kein Cloudflare-Umweg, keine Tailscale-Routing-Probleme {"name": "WordPress (CT 101)", "url": "http://10.10.10.101/robots.txt"}, {"name": "Matomo (CT 113)", "url": "http://10.10.10.113"}, {"name": "Grafana (CT 110)", "url": "http://10.10.10.110:3000"}, {"name": "Flugscanner-Agent (pve-pp-1)", "url": "http://100.126.26.46:5010/status", - "retries": 4, "timeout": 25, "retry_delay": 5}, + "retries": 2, "timeout": 10, "retry_delay": 3}, ] EXPECTED_STOPPED = { @@ -62,7 +61,6 @@ EXPECTED_STOPPED = { IGNORED_HOSTS = {"${HOSTNAME}", ""} -# Hosts die strukturell keine regelmäßigen Logs produzieren → kein Silence-Alert SILENCE_IGNORED_HOSTS = { "ct-600-webcam", # kein rsyslog, Stream läuft aber "ct-103-Intercity-Taxi", # absichtlich gestoppt @@ -190,7 +188,7 @@ def check_all() -> list[str]: new_mails = [] for m in important: fp = hashlib.md5( - f"{m.get('date_str','')}|{m.get('from','')}|{m.get('subject','')}".encode() + f"{m.get('date_str','')}{m.get('from','')}{m.get('subject','')}".encode() ).hexdigest() if fp not in seen: new_mails.append(m)