From 301fc507cbd234992baed23b35ec61e7acbd4dc3 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 11 Mar 2026 14:38:48 +0700 Subject: [PATCH] =?UTF-8?q?monitor:=20CT=20101=20pve-pp-2=20als=20expected?= =?UTF-8?q?=5Fstopped=20=E2=80=94=20kein=20Alarm=20f=C3=BCr=20Standby-Cont?= =?UTF-8?q?ainer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- homelab-ai-bot/monitor.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/homelab-ai-bot/monitor.py b/homelab-ai-bot/monitor.py index 8db8dd1f..b2adcc81 100644 --- a/homelab-ai-bot/monitor.py +++ b/homelab-ai-bot/monitor.py @@ -36,6 +36,13 @@ def _get_passwords(cfg): CRITICAL_CONTAINERS = [101, 109, 111, 112, 113, 115] +EXPECTED_STOPPED = { + (101, "pve-pp-2"), # yt-desktop-standby — Reserve, absichtlich gestoppt + (504, "pve-ka-2"), # Shop-Template — stopped + (8000, "pve-ka-2"), # Kunde0-Shop — stopped + (8010, "pve-ka-2"), # Kunde1-Shop — stopped +} + IGNORED_HOSTS = {"${HOSTNAME}", ""} @@ -53,8 +60,10 @@ def check_all() -> list[str]: vmid = ct.get("vmid", 0) name = ct.get("name", "?") status = ct.get("status", "unknown") + host = ct.get("_host", "") if vmid in CRITICAL_CONTAINERS and status != "running": - alerts.append(f"🔴 CT {vmid} ({name}) ist {status}!") + if (vmid, host) not in EXPECTED_STOPPED: + alerts.append(f"🔴 CT {vmid} ({name}) ist {status}!") mem = ct.get("mem", 0) maxmem = ct.get("maxmem", 1)