monitor: CT 101 pve-pp-2 als expected_stopped — kein Alarm für Standby-Container
This commit is contained in:
parent
4882e5608d
commit
301fc507cb
1 changed files with 10 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue