monitor: CT 115/Shop-VMIDs als erwartet gestoppt unabhängig vom Proxmox-Host-Key
Die API setzt _host je nach homelab.conf (z.B. pve-hetzner); (115,pve-ka-1) griff dann nicht. Erwartete stopped-VMIDs jetzt host-unabhängig bei status stopped.
This commit is contained in:
parent
e61bd7891e
commit
93aabf3fc5
1 changed files with 6 additions and 1 deletions
|
|
@ -59,6 +59,10 @@ EXPECTED_STOPPED = {
|
|||
(8010, "pve-ka-2"), # Kunde1-Shop — stopped
|
||||
}
|
||||
|
||||
# VMIDs, die auf jedem Proxmox-Host in CONFIG ok sind, solange status == stopped
|
||||
# (115 erscheint je nach API-Zuordnung auch als pve-hetzner o.ä., nicht nur ka-1/ka-3)
|
||||
EXPECTED_STOPPED_VMIDS = {115, 504, 8000, 8010}
|
||||
|
||||
IGNORED_HOSTS = {"${HOSTNAME}", ""}
|
||||
|
||||
SILENCE_IGNORED_HOSTS = {
|
||||
|
|
@ -84,7 +88,8 @@ def check_all() -> list[str]:
|
|||
status = ct.get("status", "unknown")
|
||||
host = ct.get("_host", "")
|
||||
if vmid in CRITICAL_CONTAINERS and status != "running":
|
||||
if (vmid, host) not in EXPECTED_STOPPED:
|
||||
ok_stopped = vmid in EXPECTED_STOPPED_VMIDS and status == "stopped"
|
||||
if (vmid, host) not in EXPECTED_STOPPED and not ok_stopped:
|
||||
alerts.append(f"🔴 CT {vmid} ({name}) ist {status}!")
|
||||
|
||||
mem = ct.get("mem", 0)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue