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]
|
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}", ""}
|
IGNORED_HOSTS = {"${HOSTNAME}", ""}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -53,7 +60,9 @@ def check_all() -> list[str]:
|
||||||
vmid = ct.get("vmid", 0)
|
vmid = ct.get("vmid", 0)
|
||||||
name = ct.get("name", "?")
|
name = ct.get("name", "?")
|
||||||
status = ct.get("status", "unknown")
|
status = ct.get("status", "unknown")
|
||||||
|
host = ct.get("_host", "")
|
||||||
if vmid in CRITICAL_CONTAINERS and status != "running":
|
if vmid in CRITICAL_CONTAINERS and status != "running":
|
||||||
|
if (vmid, host) not in EXPECTED_STOPPED:
|
||||||
alerts.append(f"🔴 CT {vmid} ({name}) ist {status}!")
|
alerts.append(f"🔴 CT {vmid} ({name}) ist {status}!")
|
||||||
|
|
||||||
mem = ct.get("mem", 0)
|
mem = ct.get("mem", 0)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue