fix: ct-600-webcam aus Silence-Check ausgenommen (kein rsyslog)
This commit is contained in:
parent
f75832d21a
commit
fc07039709
1 changed files with 6 additions and 1 deletions
|
|
@ -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)}")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue