Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.
Go aialertsdashboarddockerdocker-monitoringgohomelabinfrastructure-monitoringkubernetesmonitoringmspproxmoxproxmox-backup-serverproxmox-mail-gatewayproxmox-veself-hostedtruenastypescriptvspherewebhooks
Explain monitored system ledger status
rcourtmanb634aae533fc
diff --git a/docs/release-control/v6/internal/subsystems/agent-lifecycle.md b/docs/release-control/v6/internal/subsystems/agent-lifecycle.mdindex ea005ff4e4..c42b860136 100644--- a/docs/release-control/v6/internal/subsystems/agent-lifecycle.md+++ b/docs/release-control/v6/internal/subsystems/agent-lifecycle.md@@ -230,6 +230,10 @@ That shared ledger read must also preserve canonical grouped system status,including `warning`, so lifecycle-adjacent operator surfaces do not mislabellive agent-backed infrastructure as `Unknown` when the unified-resource layeralready resolved a governed degraded state.+That same ledger read now also carries backend-owned status explanation copy,+and lifecycle-adjacent details must render it beside the counting rationale so+operators can interpret warning, offline, and unknown states without inventing+local status semantics.Lifecycle-adjacent workspace copy must also keep the same commercial framing:infrastructure operations may point operators to Pulse Pro for billing, but itmust describe that boundary in monitored-system, plan-limit, and license-statusdiff --git a/docs/release-control/v6/internal/subsystems/api-contracts.md b/docs/release-control/v6/internal/subsystems/api-contracts.mdindex 9e5d8c683f..523dde46b7 100644--- a/docs/release-control/v6/internal/subsystems/api-contracts.md+++ b/docs/release-control/v6/internal/subsystems/api-contracts.md@@ -239,6 +239,10 @@ status enum end to end. Backend normalization may fail closed for unsupportedvalues, but it must not flatten governed `warning` state to `unknown`, becausethe billing and inventory surfaces need the real top-level runtime status theunified-resource resolver computed.+That same contract now also owns the backend-authored status explanation paired+with that enum, and the monitored-system ledger details surface must render it+alongside the counting explanation instead of inventing page-local wording for+what online, warning, offline, or unknown means.That client contract must also fail closed when older or partial payloads omitthe nested explanation object: the frontend may normalize missing explanationfields to empty reasons/surfaces plus a safe default summary, but it must notdiff --git a/docs/release-control/v6/internal/subsystems/cloud-paid.md b/docs/release-control/v6/internal/subsystems/cloud-paid.mdindex d90bb0d09d..4b003ca358 100644--- a/docs/release-control/v6/internal/subsystems/cloud-paid.md+++ b/docs/release-control/v6/internal/subsystems/cloud-paid.md@@ -209,6 +209,12 @@ That same disclosure copy must stay professional and customer-facing. Thesettings ledger may expose counting details and included collection paths, butit must avoid informal debug-style labels or ad hoc wording that makes thecommercial usage surface feel provisional.+That same governed ledger support surface now also owns backend-authored status+explanation copy beside the monitored-system status label. The frontend details+view may normalize a safe default when that field is absent during mixed-version+rollouts, but it must render the canonical backend explanation when present+instead of inventing page-local wording for what warning, offline, or unknown+means on a counted monitored system.Frontend billing/admin surfaces must not synthesize `plan_version` fromsubscription lifecycle state. When a hosted billing record lacks a plan label,the UI must preserve that absence instead of fabricating values like `active`diff --git a/docs/release-control/v6/internal/subsystems/storage-recovery.md b/docs/release-control/v6/internal/subsystems/storage-recovery.mdindex 27c5d5e052..f114cfaaa2 100644--- a/docs/release-control/v6/internal/subsystems/storage-recovery.md+++ b/docs/release-control/v6/internal/subsystems/storage-recovery.md@@ -151,6 +151,10 @@ That adjacent ledger read must also preserve canonical grouped system status,including `warning`, so recovery- and storage-adjacent support views do notflatten governed degraded state into a fake `unknown` label when the sharedunified-resource resolver already computed the top-level status.+That same adjacent ledger read now also carries backend-owned status+explanation copy, and support-facing details must render it beside the+counting rationale so operators can interpret warning, offline, and unknown+states without inventing page-local status wording.The same API resource serializer also refreshes canonical identity and policymetadata through the shared unified-resource helper before it writes resourcepayloads, so storage and recovery links inherit the same canonical metadatadiff --git a/frontend-modern/src/api/__tests__/monitoredSystemLedger.test.ts b/frontend-modern/src/api/__tests__/monitoredSystemLedger.test.tsindex cbbcf377e6..61a96f434c 100644--- a/frontend-modern/src/api/__tests__/monitoredSystemLedger.test.ts+++ b/frontend-modern/src/api/__tests__/monitoredSystemLedger.test.ts@@ -36,6 +36,9 @@ describe('MonitoredSystemLedgerAPI', () => {name: 'server-1',type: 'host',status: 'online',+ status_explanation: {+ summary: 'All included top-level collection paths currently report online status.',+ },last_seen: '2026-01-01T00:00:00Z',source: 'agent',explanation: {@@ -59,6 +62,7 @@ describe('MonitoredSystemLedgerAPI', () => {const result = await MonitoredSystemLedgerAPI.getLedger();expect(result.systems[0]?.explanation.summary).toContain('Counts as one monitored system');+ expect(result.systems[0]?.status_explanation?.summary).toContain('currently report online');expect(result.systems[0]?.explanation.reasons).toHaveLength(1);expect(result.systems[0]?.explanation.surfaces).toHaveLength(1);});@@ -81,6 +85,7 @@ describe('MonitoredSystemLedgerAPI', () => {const result = await MonitoredSystemLedgerAPI.getLedger();expect(result.systems[0]?.explanation.summary).toContain('counts this top-level collection path');+ expect(result.systems[0]?.status_explanation?.summary).toContain('currently report online');expect(result.systems[0]?.explanation.reasons).toEqual([]);expect(result.systems[0]?.explanation.surfaces).toEqual([]);});diff --git a/frontend-modern/src/api/monitoredSystemLedger.ts b/frontend-modern/src/api/monitoredSystemLedger.tsindex 9f55e63b14..634f1c271e 100644--- a/frontend-modern/src/api/monitoredSystemLedger.ts+++ b/frontend-modern/src/api/monitoredSystemLedger.ts@@ -20,10 +20,15 @@ export interface MonitoredSystemLedgerExplanation {surfaces: MonitoredSystemLedgerExplanationSurface[];}+export interface MonitoredSystemLedgerStatusExplanation {+ summary: string;+}+export interface MonitoredSystemLedgerEntry {name: string;type: string;status: MonitoredSystemLedgerStatus;+ status_explanation?: MonitoredSystemLedgerStatusExplanation;last_seen: string; // RFC3339 or emptysource: string;explanation?: MonitoredSystemLedgerExplanation;@@ -51,9 +56,13 @@ function normalizeMonitoredSystemLedgerEntry(entry: MonitoredSystemLedgerEntry,): MonitoredSystemLedgerEntry {const explanation = entry.explanation;+ const status = normalizeMonitoredSystemLedgerStatus(entry.status);return {...entry,- status: normalizeMonitoredSystemLedgerStatus(entry.status),+ status,+ status_explanation: {+ summary: entry.status_explanation?.summary ?? defaultMonitoredSystemStatusExplanation(status),+ },explanation: {summary:explanation?.summary ??@@ -77,3 +86,16 @@ function normalizeMonitoredSystemLedgerStatus(return 'unknown';}}++function defaultMonitoredSystemStatusExplanation(status: MonitoredSystemLedgerStatus): string {+ switch (status) {+ case 'online':+ return 'All included top-level collection paths currently report online status.';+ case 'warning':+ return 'At least one included top-level collection path is degraded or stale.';+ case 'offline':+ return 'At least one included top-level collection path is offline or disconnected.';+ default:+ return 'Pulse cannot determine a canonical runtime status for this monitored system yet.';+ }+}diff --git a/frontend-modern/src/components/Settings/MonitoredSystemLedgerPanel.tsx b/frontend-modern/src/components/Settings/MonitoredSystemLedgerPanel.tsxindex 2a9c59b079..aef85fa292 100644--- a/frontend-modern/src/components/Settings/MonitoredSystemLedgerPanel.tsx+++ b/frontend-modern/src/components/Settings/MonitoredSystemLedgerPanel.tsx@@ -14,6 +14,7 @@ import { MonitoredSystemLedgerAPI } from '@/api/monitoredSystemLedger';import type {MonitoredSystemLedgerEntry,MonitoredSystemLedgerExplanation,+ MonitoredSystemLedgerStatusExplanation,} from '@/api/monitoredSystemLedger';import { getSimpleStatusIndicator } from '@/utils/status';import {@@ -45,6 +46,14 @@ function systemExplanation(system: MonitoredSystemLedgerEntry): MonitoredSystemL};}+function systemStatusExplanation(system: MonitoredSystemLedgerEntry): MonitoredSystemLedgerStatusExplanation {+ return {+ summary:+ system.status_explanation?.summary ??+ 'Pulse cannot determine a canonical runtime status for this monitored system yet.',+ };+}+export function MonitoredSystemLedgerPanel(props: MonitoredSystemLedgerPanelProps = {}) {const [ledger, { refetch }] = createResource(() => MonitoredSystemLedgerAPI.getLedger());const [expandedSystemKey, setExpandedSystemKey] = createSignal<string | null>(null);@@ -145,6 +154,7 @@ export function MonitoredSystemLedgerPanel(props: MonitoredSystemLedgerPanelPropconst explanationID = `monitored-system-explanation-${index()}`;const expanded = () => expandedSystemKey() === key;const explanation = systemExplanation(system);+ const statusExplanation = systemStatusExplanation(system);return (<TableRow><TableCell>@@ -164,6 +174,12 @@ export function MonitoredSystemLedgerPanel(props: MonitoredSystemLedgerPanelPropid={explanationID}class="space-y-2 rounded-md border border-border bg-surface px-3 py-2 text-xs text-muted">+ <div class="space-y-1">+ <p class="font-medium text-base-content">Current status</p>+ <p class="whitespace-normal text-base-content">+ {statusExplanation.summary}+ </p>+ </div><p class="whitespace-normal text-base-content">{explanation.summary}</p>diff --git a/frontend-modern/src/components/Settings/__tests__/MonitoredSystemLedgerPanel.test.tsx b/frontend-modern/src/components/Settings/__tests__/MonitoredSystemLedgerPanel.test.tsxindex 24aec51691..4818607a39 100644--- a/frontend-modern/src/components/Settings/__tests__/MonitoredSystemLedgerPanel.test.tsx+++ b/frontend-modern/src/components/Settings/__tests__/MonitoredSystemLedgerPanel.test.tsx@@ -75,6 +75,9 @@ describe('MonitoredSystemLedgerPanel', () => {name: 'host-1',type: 'host',status: 'online',+ status_explanation: {+ summary: 'All included top-level collection paths currently report online status.',+ },last_seen: '2026-01-01T00:00:00Z',source: 'agent',explanation: {@@ -134,6 +137,9 @@ describe('MonitoredSystemLedgerPanel', () => {name: 'server-a',type: 'host',status: 'online',+ status_explanation: {+ summary: 'All included top-level collection paths currently report online status.',+ },last_seen: '2026-01-01T00:00:00Z',source: 'agent',explanation: {@@ -153,6 +159,10 @@ describe('MonitoredSystemLedgerPanel', () => {name: 'server-b',type: 'pbs-server',status: 'offline',+ status_explanation: {+ summary:+ 'At least one included top-level collection path is offline or disconnected, so Pulse marks this monitored system as offline.',+ },last_seen: '2026-01-02T00:00:00Z',source: 'pbs',explanation: {@@ -207,6 +217,12 @@ describe('MonitoredSystemLedgerPanel', () => {'Counts as one monitored system because Pulse merged 2 top-level views into one canonical system using shared machine identity.',),).toBeInTheDocument();+ expect(screen.getByText('Current status')).toBeInTheDocument();+ expect(+ screen.getByText(+ 'At least one included top-level collection path is offline or disconnected, so Pulse marks this monitored system as offline.',+ ),+ ).toBeInTheDocument();expect(screen.getByText('Included collection paths')).toBeInTheDocument();expect(screen.getByText('server-b host (host, agent)')).toBeInTheDocument();expect(@@ -221,6 +237,9 @@ describe('MonitoredSystemLedgerPanel', () => {name: 'server-a',type: 'host',status: 'online',+ status_explanation: {+ summary: 'All included top-level collection paths currently report online status.',+ },last_seen: '2026-01-01T00:00:00Z',source: 'agent',},@@ -240,6 +259,9 @@ describe('MonitoredSystemLedgerPanel', () => {expect(screen.getByText('Pulse counts this top-level collection path as one monitored system.'),).toBeInTheDocument();+ expect(+ screen.getByText('All included top-level collection paths currently report online status.'),+ ).toBeInTheDocument();expect(screen.queryByText('Included collection paths')).not.toBeInTheDocument();});});diff --git a/internal/api/contract_test.go b/internal/api/contract_test.goindex 729fdb03f4..a30d26e713 100644--- a/internal/api/contract_test.go+++ b/internal/api/contract_test.go@@ -577,9 +577,12 @@ func TestContract_MonitoredSystemLedgerJSONSnapshot(t *testing.T) {payload := MonitoredSystemLedgerResponse{Systems: []MonitoredSystemLedgerEntry{{- Name: "Tower",- Type: "host",- Status: "warning",+ Name: "Tower",+ Type: "host",+ Status: "warning",+ StatusExplanation: MonitoredSystemLedgerStatusExplanation{+ Summary: "At least one included top-level collection path is degraded or stale, so Pulse marks this monitored system as warning.",+ },LastSeen: "2026-03-18T17:30:00Z",Source: "agent",Explanation: MonitoredSystemLedgerExplanation{@@ -616,6 +619,9 @@ func TestContract_MonitoredSystemLedgerJSONSnapshot(t *testing.T) {"name":"Tower","type":"host","status":"warning",+ "status_explanation":{+ "summary":"At least one included top-level collection path is degraded or stale, so Pulse marks this monitored system as warning."+ },"last_seen":"2026-03-18T17:30:00Z","source":"agent","explanation":{diff --git a/internal/api/monitored_system_ledger.go b/internal/api/monitored_system_ledger.goindex 2c1e3841b4..160e9e516e 100644--- a/internal/api/monitored_system_ledger.go+++ b/internal/api/monitored_system_ledger.go@@ -13,12 +13,17 @@ import (// MonitoredSystemLedgerEntry represents a single counted top-level monitored// system.type MonitoredSystemLedgerEntry struct {- Name string `json:"name"`- Type string `json:"type"`- Status string `json:"status"` // "online", "offline", "unknown"- LastSeen string `json:"last_seen"` // RFC3339 or empty- Source string `json:"source"`- Explanation MonitoredSystemLedgerExplanation `json:"explanation"`+ Name string `json:"name"`+ Type string `json:"type"`+ Status string `json:"status"` // "online", "warning", "offline", "unknown"+ StatusExplanation MonitoredSystemLedgerStatusExplanation `json:"status_explanation"`+ LastSeen string `json:"last_seen"` // RFC3339 or empty+ Source string `json:"source"`+ Explanation MonitoredSystemLedgerExplanation `json:"explanation"`+}++type MonitoredSystemLedgerStatusExplanation struct {+ Summary string `json:"summary"`}type MonitoredSystemLedgerExplanation struct {@@ -97,13 +102,15 @@ func (r *Router) handleMonitoredSystemLedger(w http.ResponseWriter, req *http.Reentries := make([]MonitoredSystemLedgerEntry, 0, len(systems))for _, system := range systems {+ status := normalizeStatus(string(system.Status))entries = append(entries, MonitoredSystemLedgerEntry{- Name: system.Name,- Type: system.Type,- Status: normalizeStatus(string(system.Status)),- LastSeen: formatLastSeen(system.LastSeen),- Source: system.Source,- Explanation: monitoredSystemLedgerExplanation(system.Explanation),+ Name: system.Name,+ Type: system.Type,+ Status: status,+ StatusExplanation: monitoredSystemLedgerStatusExplanation(status),+ LastSeen: formatLastSeen(system.LastSeen),+ Source: system.Source,+ Explanation: monitoredSystemLedgerExplanation(system.Explanation),})}@@ -131,6 +138,27 @@ func normalizeStatus(s string) string {}}+func monitoredSystemLedgerStatusExplanation(status string) MonitoredSystemLedgerStatusExplanation {+ switch status {+ case "online":+ return MonitoredSystemLedgerStatusExplanation{+ Summary: "All included top-level collection paths currently report online status.",+ }+ case "warning":+ return MonitoredSystemLedgerStatusExplanation{+ Summary: "At least one included top-level collection path is degraded or stale, so Pulse marks this monitored system as warning.",+ }+ case "offline":+ return MonitoredSystemLedgerStatusExplanation{+ Summary: "At least one included top-level collection path is offline or disconnected, so Pulse marks this monitored system as offline.",+ }+ default:+ return MonitoredSystemLedgerStatusExplanation{+ Summary: "Pulse cannot determine a canonical runtime status for this monitored system yet.",+ }+ }+}+func formatLastSeen(t time.Time) string {if t.IsZero() {return ""diff --git a/internal/api/monitored_system_ledger_test.go b/internal/api/monitored_system_ledger_test.goindex 9cf6486391..e8d560dd6b 100644--- a/internal/api/monitored_system_ledger_test.go+++ b/internal/api/monitored_system_ledger_test.go@@ -10,9 +10,12 @@ import (func TestMonitoredSystemLedgerEntryTypes(t *testing.T) {entry := MonitoredSystemLedgerEntry{- Name: "server-1",- Type: "host",- Status: "online",+ Name: "server-1",+ Type: "host",+ Status: "online",+ StatusExplanation: MonitoredSystemLedgerStatusExplanation{+ Summary: "All included top-level collection paths currently report online status.",+ },LastSeen: "2025-01-01T00:00:00Z",Source: "agent",Explanation: MonitoredSystemLedgerExplanation{@@ -36,6 +39,9 @@ func TestMonitoredSystemLedgerEntryTypes(t *testing.T) {if decoded.Name != "server-1" || decoded.Type != "host" || decoded.Status != "online" {t.Errorf("round-trip mismatch: %+v", decoded)}+ if decoded.StatusExplanation.Summary == "" {+ t.Errorf("status explanation mismatch: %+v", decoded.StatusExplanation)+ }if decoded.Source != "agent" {t.Errorf("source mismatch: got %q", decoded.Source)}@@ -78,6 +84,25 @@ func TestFormatLastSeen(t *testing.T) {}}+func TestMonitoredSystemLedgerStatusExplanation(t *testing.T) {+ tests := []struct {+ status string+ want string+ }{+ {"online", "All included top-level collection paths currently report online status."},+ {"warning", "At least one included top-level collection path is degraded or stale, so Pulse marks this monitored system as warning."},+ {"offline", "At least one included top-level collection path is offline or disconnected, so Pulse marks this monitored system as offline."},+ {"unknown", "Pulse cannot determine a canonical runtime status for this monitored system yet."},+ }++ for _, tt := range tests {+ got := monitoredSystemLedgerStatusExplanation(tt.status)+ if got.Summary != tt.want {+ t.Errorf("monitoredSystemLedgerStatusExplanation(%q) = %q, want %q", tt.status, got.Summary, tt.want)+ }+ }+}+func TestMonitoredSystemLedgerResponseEmptyState(t *testing.T) {resp := EmptyMonitoredSystemLedgerResponse()data, err := json.Marshal(resp)@@ -136,9 +161,12 @@ func TestHandleMonitoredSystemLedgerHTTP(t *testing.T) {resp := MonitoredSystemLedgerResponse{Systems: []MonitoredSystemLedgerEntry{{- Name: "test-host",- Type: "host",- Status: "online",+ Name: "test-host",+ Type: "host",+ Status: "online",+ StatusExplanation: MonitoredSystemLedgerStatusExplanation{+ Summary: "All included top-level collection paths currently report online status.",+ },LastSeen: "2025-01-01T00:00:00Z",Source: "agent",Explanation: MonitoredSystemLedgerExplanation{@@ -175,6 +203,9 @@ func TestHandleMonitoredSystemLedgerHTTP(t *testing.T) {if decoded.Systems[0].Name != "test-host" || decoded.Systems[0].Type != "host" {t.Errorf("unexpected system: %+v", decoded.Systems[0])}+ if decoded.Systems[0].StatusExplanation.Summary == "" {+ t.Errorf("expected status explanation summary, got %+v", decoded.Systems[0].StatusExplanation)+ }if decoded.Systems[0].Explanation.Summary == "" {t.Errorf("expected explanation summary, got %+v", decoded.Systems[0].Explanation)}