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)