Three rules chose a node's single CPU temperature. Node history took
CPUMax first, agent history took cpu_package first, and the node drawer
recomputed the maximum of package, CPUMax and every core in the
browser. On an agent-fed node CPUMax is built from cores alone and can
sit below the package, and elsewhere a core can run above the package,
so the drawer's CPU temperature headline could disagree with the line
drawn beneath it and with the History tab. Node alerts and the CPU
low/record tracking used yet another package-first rule.
models.PrimaryCPUTemperatureCelsius is now the one rule: the hottest
usable package, CPU-maximum or core reading, with a sensor-map form for
agents. Node and agent history, the router's live fallbacks, the
unified resource temperature, node temperature alerts and the CPU
low/record tracking all call it. The drawer reads the resource value
through a new Node.cpuTemperature field instead of recomputing it, and
getCpuTemperature is removed.
Mock mode wrote a second package reading under a cpu.package key into
every agent host, including node-linked ones, from a series unrelated
to the node's static reading. A node and its linked agent now carry one
reading, sampled from the agent's series under the agent's real keys,
and both histories seed from that series, so the current reading
continues the line.
When adaptive polling is enabled (ADAPTIVE_POLLING_ENABLED or system.json;
off by default, no UI), the scheduler picks PVE, PBS and PMG intervals
itself and never reads the per-platform ones. A healthy instance's
staleness score is near zero after every success, so its cadence stretches
toward AdaptivePollingMaxInterval (5 minutes by default). Resource
freshness was still derived from the per-platform intervals, with floors of
60s for Proxmox and 120s for PBS and PMG, so healthy rows read stale for
much of every cycle. A live stack with a fake PMG polled 3.5 to 4.3
minutes apart and the row sat degraded with telemetry_stale from two
minutes after each poll until the next one. The PVE node offline grace and
the node temperature carry window derive from the same cadence and lapsed
between polls too.
Monitor.resourcePollIntervals now judges all three sources by the
scheduler's own maximum interval, which bounds every interval it selects.
ResourceStaleThresholdsForConfig reads the same normalized bounds through
a normalizedSchedulerConfig shared with NewAdaptiveScheduler, so callers
without a monitor agree with the one that has it. The same live stack
stayed online for 14 minutes. Fixed-cadence behaviour is unchanged.
Per-instance planned intervals were not used: they are jittered and shrink
as a poll runs late, so a per-source threshold built on them would flap.
The contract note this replaces said freshness keeps deriving from the
per-platform intervals; the user doc now says what adaptive polling does to
freshness and offline detection. The cost is a longer node hold in
adaptive mode (10 minutes with the defaults). A valid /cluster/status
report that a member is offline still applies immediately.
Two Proxmox connections can each have a node with the same name, which
is common for MSPs running one px1 per site. The node temperature
lookup fell back to the first host agent whose hostname matched the
node name, even when that agent was linked to the other site's node,
and even when the name was ambiguous enough that the agent linker had
refused to link it. Site B's px1 then showed, alerted on and recorded
history for site A's sensors. The cluster sensor cache leaked the same
way: an agent's SSH readings for its cluster siblings were keyed by
bare node name, so a site A sibling reading fed site B's node.
The poller now hands the lookup the polled node, and the lookup works
on that node's slot. The state folds the views of one machine reached
through two connections (a cluster added twice, or a multi-homed host
added by each address) into one node held under one view's ID, and
the agent link follows it. Those views used to find their agent only
through the loose hostname match, so a polled view the read state does
not hold also takes the one same-named node proven to be the same
machine. models.NodeObservationsSameMachine and
models.HostAgentBridgesNodeViews give that proof from the evidence
UpdateNodesForInstance folds on, and the state's agent corroboration
check now shares its rule with them. Ambiguous candidates are declined,
as the state declines an ambiguous alias.
An agent linked to the slot is the node's agent. The hostname fallback
only takes an agent with no link when no node outside the slot and no
second unlinked agent has the name. Cluster sensor cache entries record
their reporting agent and serve a node only when that agent's linked
node shares one of the slot's connections, or belongs to a connection
whose configured view of the node has a matching TLS fingerprint.
LinkedNodeID holds the Proxmox source node ID for automatic, manual and
continuity-restored links, so the link match needs no normalization.
The physical-disk SMART merge already matches agents by
node.LinkedAgentID within one instance and is unchanged.
The poller reads the previous poll's nodes back from the unified read
state, but previousNodeFromView returned the registry's unified resource
ID and no temperature. Every lookup keyed on the Proxmox source ID
missed: nodeLastOnline in the offline grace policy, the temperature
carry, the CPU low/record tracking (reset to the current reading every
poll) and the node memory carry. When a whole instance poll failed,
markPVEInstanceNodesUnreachable wrote the projected nodes back, so each
failed poll re-ingested the node under a new unified ID. Cluster members
also lost the cluster identity their canonical ID derives from, so they
changed ID for the length of an outage.
The projection now returns the source ID, the stored temperature
details, the cluster name and the linked agent ID, and
previousNodesForInstance restores the config-derived identity stamps
(provider-scoped flag, native aliases, TLS fingerprint) the way
pollPVENode writes them.
Reviving those paths needed four bounds:
- The node memory carry uses the poller's own validated snapshot rather
than the read state, which holds the agent's reading on a node merged
with a host agent, and keeps used + cache + free equal to the total.
- A carried temperature keeps a lapsed host agent's lease. A reading
stamped no later than the agent's last report is not carried, so the
five-minute carry window cannot hold a silent agent's reading in
alerts and history past its lease, which #2582 guarantees.
- A carried reading keeps the node's CPU and GPU temperatures only. Its
SMART and NVMe rows also stamp the node's physical disks, so a disk
that went to standby would be stamped and recorded with its pre-sleep
value.
- Outage preservation and authoritative membership reconciliation keep a
node's temperature only under those rules and drop it when the node
goes offline.
TestPollPVEInstanceMarksStaleNodesOfflineWhenGetNodesReturnsEmpty relied
on the dead nodeLastOnline lookup and now ages that sighting too. The
silent-agent test from #2582 now rebuilds the store as production does
and feeds the polled node back, which is what exercises the carry.
A host agent linked to a Proxmox node merges with it into one read-state
row, and every PVE poll refreshes that row's LastSeen. The agent's last
sensors stay in state after it stops reporting. The node temperature
lookup checked neither: it returned the retained sensors stamped with
the row's LastSeen, so each poll presented the silent agent's last
reading as a fresh measurement. An open node temperature alert was
re-observed every poll (LastSeen kept moving, so stale-alert cleanup
never reached it), a stale hot reading could keep activating, node
history recorded it as new samples, the UI showed it as current, and
SSH collection was skipped as if a recent agent payload existed. Since
#2569 evaluates node temperature for agent-backed nodes, this holds
their temperature alerts open.
The lookup now reads the agent source's own sighting through a new
HostView.SourceStatus (matching the VM, container and disk views), uses
the agent's sensors only inside the reporting lease that keeps the agent
online, and stamps the reading with the agent's report time. Past the
lease the node has no agent reading, which alert evaluation treats as
missing rather than as evidence the node cooled down.
The poller's carry-over of a previous reading when collection fails is
also bounded to max(5m, 2 x PVE polling interval) and keeps its original
timestamp. That branch does not engage today, because the previous-node
projection carries the unified resource id and no temperature, so it
never matches the polled node; the bound keeps it from presenting a
frozen value as current once that projection is repaired.
An admin-browser update read does not establish access for the monitoring token. Cover the proxied target path, configured token, denial propagation and healthy endpoint retention. Remove the unsupported Sys.Audit diagnostic hint: endpoint access is determined by Proxmox, not general inventory access.
Change-source: pulse-maintainer
Contract-Neutral: Diagnostic wording and method-comment correction plus synthetic regression coverage only; no collection logic, public API, permission policy, freshness or counter semantics change.
The config layer already refuses to consolidate two same-named clusters
whose TOFU-captured TLS fingerprints contradict, and node aggregation
keeps any two same-named clusters from different connection instances
apart unconditionally. Two gaps remained one layer down. First, the
endpoint-IP agent match bypassed the contradiction guard entirely, so
two sites reusing RFC1918 addressing (the MSP support case: pve01 on
192.168.1.11 at both sites) still bound the second site's node to the
first site's host agent, attaching the wrong machine's telemetry.
Second, the unconditional split had no way to recognize the legitimate
duplicate - the same cluster added twice through different member
addresses with no config-level endpoint overlap could never fold back
into one node slot.
The aggregation layer now receives the config layer's identity
evidence: each PVE node carries the TLS certificate fingerprint of its
own named endpoint record (standalone nodes carry the instance
fingerprint; a cluster member never inherits the instance-level
fingerprint, which pins whichever member the connection URL reaches).
Same-named clusters from different instances merge only when both views
carry the same fingerprint; contradicting or unknown evidence keeps the
fail-safe split. Agent binding applies the identical doctrine: hostname
and address matches are rejected when the candidate agent's linked
nodes live in a different named cluster or carry a different
fingerprint, closing the previously unguarded endpoint-IP path.
Reported via support by an MSP whose sites reuse cluster names, node
names, and RFC1918 ranges.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>