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.
Non-default organisations run their monitors against a detached copy of
the server config (#1619). A system-settings save reaches those monitors
only as runtime PBS and PMG polling overrides, so the copy that the
connections list reads through the org's config handlers kept the old
interval until that monitor was rebuilt. The active-to-stale cutoff is
3 x the polling interval, so raising PBS from 1m to 5m left a 3m cutoff
and Settings > Infrastructure badges read "stale" for part of every
cycle, while lowering it delayed the badge by the same factor.
Add Monitor.BasePollInterval, an override-aware reader for the clamped
PVE, PBS and PMG base cadence that never takes m.mu, and have the
connections input builder use it whenever a monitor is present. The
fixed-cadence branch of resourcePollIntervals reads the same accessor, so
resource freshness and connection freshness share one derivation.
The system settings GET is not affected: both production routes serve
SystemSettingsHandler, which reads the base config and persisted
settings; the configapi handler that reads the tenant copy is only a
fallback when that handler is absent.
Non-default organisations run tenant monitors against a detached config
copy (#1619), so a saved PBS or PMG polling interval reaches them only as
a runtime override pushed by the system-settings save. Their fixed-cadence
schedulers read that override, but resourceStaleThresholds still derived
the PBS and PMG stale windows from the config copy. Raising PBS to 5
minutes left the window at max(2 x old interval, 120s), so healthy PBS and
PMG rows in those organisations read stale and degraded between real
polls until the next restart; lowering the interval left it too long.
The monitor now derives those thresholds from the same override-aware,
clamped setting readers its scheduler uses. An adaptive scheduler picks
its own intervals and ignores the overrides, so freshness there keeps its
existing derivation. ResourceStaleThresholdsForConfig stays the
config-only derivation for adapter construction, which the monitor
overwrites on its next store update. The default organisation shares the
server's config pointer and PVE interval saves reload every monitor, so
neither needed the change.
The resources API rebuilds its registry from the monitor's unified
seed, but built it with NewRegistry and plain ingests, so its stale
pass used the registry defaults while the monitor judges each source
by its configured polling cadence. A Proxmox node polled every two
minutes read stale, with warning status, in /api/resources ninety
seconds after its poll while the websocket called it online.
Presentation coalescing had the same gap in both views. When it merges
an agent row the registry kept apart into its Proxmox node by hostname,
it picked each reading's source by the default thresholds, so the row
showed a silent agent's readings over a poll the registry calls
current.
The seed now carries the thresholds its registry generation was judged
by. The monitor adapter records them per generation: thresholds set
since the last rebuild wait for the rebuild that applies them, and the
read-state overlays and live supplemental refreshes of a generation are
judged by its thresholds, since re-judging a listing cannot clear a
stale verdict it already carries. The monitor lists a generation with
its thresholds from one registry pointer, and a view built from mock
fixtures or a bare snapshot reports none (the defaults it was judged
by). The monitor hands seed, freshness and thresholds over from one
view, per tenant too. The resources API builds
its registry with them (NewRegistryWithStaleThresholds: ingests and
stale passes that pass none use them) and keys its cache on its own
copy. The coalesce judges metric freshness with metricSourceStale, the
rule the stale pass and the merge already share, and both the
broadcast and ListForPresentation pass their view's thresholds. The
broadcast coalesce also honours the operator's merge exclusions, so the
adapter's CoalesceForPresentation takes the listing's thresholds next
to them.
Patrol's scoped runtime state still rebuilds registries with the
defaults.
The public demo runs PULSE_MOCK_UPDATE_INTERVAL=60s, which stretches the
10-cohort supplemental rotation to 600s while the unified registry still
marks TrueNAS/VMware/availability sources stale after 120s. Every row those
sources own spent ~80% of each rotation flagged as a degraded stale source,
so the TrueNAS Storage tab read Healthy 0 / Attention 21 (and the vSphere
page all-Attention) despite healthy fixture data.
Rebase provider-backed fixtures every tick once the rotation would outlive
the 120s freshness budget (at slow ticks that is cheaper per wall-clock
second than the default 2s config's once-per-20s cadence), and derive mock
supplemental stale thresholds from the actual refresh cadence the same way
PVE/PBS/PMG thresholds already derive from their polling intervals. Split
the supplemental uptime step so per-tick refreshes do not advance PBS
uptime by the rotation-scaled step.