mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-10-24 04:33:17 +00:00
e3a42d86c3
checkMockAlerts evaluated mock nodes, guests, storage, PBS, PMG and Docker hosts but never host agents. Live agents are evaluated by CheckHost as each report lands; mock mode discards reports and the host health sweep never sees fixture agents, so no agent CPU, memory, disk, temperature or offline alert could open against mock data. A mock agent at 94% memory sat under an 85% trigger with no alert, and alert work on agents needed a private build to reproduce anything. Mock passes now evaluate every fixture agent with the live lifecycle boundaries: - offline fixtures go through HandleHostOfflineWithCorrelation, since CheckHost treats its input as a fresh report and marks it online; - agents run before nodes, so a node with an online linked agent hands its metric alerts to the agent on the first tick; - an agent that leaves the estate on a runtime mock config change goes through HandleHostRemoved, like a deleted live agent; - leaving mock mode routes the fixture agents through HandleHostRemoved, releasing hostname registrations that ClearActiveAlerts leaves behind and that would otherwise suppress a real node named pve1; a pass already in flight finds mock mode off and evaluates nothing. Evaluating agents exposed a mock-only reading: every Kubernetes pod took a single-pod share (10-80%) of its node's allocatable memory, so any node running four or more pods, and its linked agent, read a constant 100%. On the public demo's estate that became two permanent critical memory alerts no real cluster would raise. Pods now share 0.7 single-pod footprints per node (at most 58% of allocatable in steady state), and a 60% per-node ceiling clips the transient while rescheduled pods' readings settle, so those nodes stay under 82%.