From fc07039709a5b5a541502e9adf3ec83b8048f584 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 11 Mar 2026 21:45:58 +0700 Subject: [PATCH] fix: ct-600-webcam aus Silence-Check ausgenommen (kein rsyslog) --- homelab-ai-bot/monitor.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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)}")