diff --git a/homelab-ai-bot/monitor.py b/homelab-ai-bot/monitor.py index 4e4bb63b..0411ef6a 100644 --- a/homelab-ai-bot/monitor.py +++ b/homelab-ai-bot/monitor.py @@ -55,6 +55,9 @@ EXPECTED_STOPPED = { IGNORED_HOSTS = {"${HOSTNAME}", ""} +# Hosts die strukturell keine regelmäßigen Logs produzieren → kein Silence-Alert +SILENCE_IGNORED_HOSTS = {"ct-600-webcam"} + def check_all() -> list[str]: """Regelbasierter Check (Stufe 1). Gibt Liste von Alarmen zurück.""" @@ -104,7 +107,9 @@ def check_all() -> list[str]: silent = loki_client.check_silence(minutes=35) if silent and "error" not in silent[0]: - names = [s["host"] for s in silent if s.get("host") not in IGNORED_HOSTS] + names = [s["host"] for s in silent + if s.get("host") not in IGNORED_HOSTS + and s.get("host") not in SILENCE_IGNORED_HOSTS] if names: alerts.append(f"⚠️ Keine Logs seit 35+ Min: {', '.join(names)}")