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
Promote canonical monitored system signal timestamp
rcourtman8de7ce6a533f
diff --git a/docs/release-control/v6/internal/subsystems/agent-lifecycle.md b/docs/release-control/v6/internal/subsystems/agent-lifecycle.mdindex 591dd41a64..3cef83b2af 100644--- a/docs/release-control/v6/internal/subsystems/agent-lifecycle.md+++ b/docs/release-control/v6/internal/subsystems/agent-lifecycle.md@@ -238,10 +238,11 @@ Those status details are now structured as well: lifecycle-adjacent consumersmust preserve the canonical reason list from the ledger read so operators cansee which grouped source or surface degraded and when it last reported,instead of only seeing a generic warning/offline paragraph.-That same ledger read also treats `last_seen` as the freshest included grouped-observation rather than a promise that every grouped source is healthy at that-moment, so lifecycle-adjacent consumers must not label it with generic-single-source health wording.+That same ledger read also treats `latest_included_signal_at` as the freshest+included grouped observation, with `last_seen` left only as a compatibility+alias during rollout, rather than a promise that every grouped source is+healthy at that moment. Lifecycle-adjacent consumers must not label it with+generic single-source health wording.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 df399e9b10..f7d9b8bce3 100644--- a/docs/release-control/v6/internal/subsystems/api-contracts.md+++ b/docs/release-control/v6/internal/subsystems/api-contracts.md@@ -252,8 +252,10 @@ That canonical summary must also carry the mixed-source freshness explanationwhen the freshest grouped observation came from a different source than thedegraded one, so API consumers can show a fresh `Last Seen` value withoutmaking warning or offline state look contradictory.-That same `last_seen` field is the freshest included grouped observation, not a-claim that every grouped source reported successfully at that time. API+That same timestamp is now canonically exposed as+`latest_included_signal_at`; `last_seen` remains a compatibility alias only+during rollout. It represents the freshest included grouped observation, not a+claim that every grouped source reported successfully at that time, and APIconsumers must preserve that meaning in their labeling and presentation.That client contract must also fail closed when older or partial payloads omitthe nested explanation object: the frontend may normalize missing explanationdiff --git a/docs/release-control/v6/internal/subsystems/cloud-paid.md b/docs/release-control/v6/internal/subsystems/cloud-paid.mdindex fd35b7f36d..06561cc58f 100644--- a/docs/release-control/v6/internal/subsystems/cloud-paid.md+++ b/docs/release-control/v6/internal/subsystems/cloud-paid.md@@ -219,11 +219,12 @@ That same cloud-paid surface must now also render the canonical status reasonlist when present, so customers can see exactly which grouped source ortop-level surface degraded and when it last reported rather than only readinggeneric status copy beside a fresh aggregate `Last Seen` value.-That same settings surface must also label the aggregate `last_seen` field by-its real meaning. In the monitored-system ledger it is the freshest included-grouped observation, not a guarantee that every grouped source is healthy, so-the UI must not present it with a bare `Last Seen` heading that implies a-single-source health timestamp.+That same settings surface must also label the aggregate monitored-system+signal timestamp by its real meaning. The canonical API field is now+`latest_included_signal_at`, while `last_seen` is compatibility-only during+rollout; it represents the freshest included grouped observation, not a+guarantee that every grouped source is healthy, so the UI must not present it+with single-source `Last Seen` wording.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 afbf6466ce..a795aeda3c 100644--- a/docs/release-control/v6/internal/subsystems/storage-recovery.md+++ b/docs/release-control/v6/internal/subsystems/storage-recovery.md@@ -376,10 +376,11 @@ adjacent consumers may read the ledger’s nested status explanation, but theymust preserve the backend-provided reason list for stale or offline groupedsources instead of reducing those mixed fresh/stale system states back to ageneric label.-That same ledger dependency also treats `last_seen` as the freshest grouped-observation rather than a universal health timestamp, so storage- or recovery--adjacent consumers must not present that field with bare single-source `Last-Seen` wording that hides grouped stale/offline conditions.+That same ledger dependency also treats `latest_included_signal_at` as the+freshest grouped observation, with `last_seen` left only as a compatibility+alias during rollout, rather than a universal health timestamp, so storage- or+recovery-adjacent consumers must not present that field with bare single-+source `Last Seen` wording that hides grouped stale/offline conditions.That same shared `internal/api/` dependency now also assumes self-hostedcommercial counting is canonical at the top-level monitored-system boundary:shared setup, deploy, entitlement, and API-backed monitoring helpers may notdiff --git a/frontend-modern/src/api/__tests__/monitoredSystemLedger.test.ts b/frontend-modern/src/api/__tests__/monitoredSystemLedger.test.tsindex 6d967be341..9c4398582e 100644--- a/frontend-modern/src/api/__tests__/monitoredSystemLedger.test.ts+++ b/frontend-modern/src/api/__tests__/monitoredSystemLedger.test.ts@@ -40,6 +40,7 @@ describe('MonitoredSystemLedgerAPI', () => {summary: 'All included top-level collection paths currently report online status.',reasons: [],},+ latest_included_signal_at: '2026-01-01T00:00:00Z',last_seen: '2026-01-01T00:00:00Z',source: 'agent',explanation: {@@ -76,6 +77,7 @@ describe('MonitoredSystemLedgerAPI', () => {name: 'server-1',type: 'host',status: 'online',+ latest_included_signal_at: '2026-01-01T00:00:00Z',last_seen: '2026-01-01T00:00:00Z',source: 'agent',},@@ -100,6 +102,7 @@ describe('MonitoredSystemLedgerAPI', () => {name: 'server-1',type: 'host',status: 'warning',+ latest_included_signal_at: '2026-01-01T00:00:00Z',last_seen: '2026-01-01T00:00:00Z',source: 'agent',},@@ -113,13 +116,14 @@ describe('MonitoredSystemLedgerAPI', () => {expect(result.systems[0]?.status).toBe('warning');});- it('preserves the freshest included observation timestamp from the API contract', async () => {+ it('preserves the canonical latest included signal timestamp from the API contract', async () => {vi.mocked(apiFetchJSON).mockResolvedValueOnce({systems: [{name: 'Tower',type: 'host',status: 'warning',+ latest_included_signal_at: '2026-03-23T11:59:50Z',last_seen: '2026-03-23T11:59:50Z',source: 'multiple',},@@ -130,7 +134,27 @@ describe('MonitoredSystemLedgerAPI', () => {const result = await MonitoredSystemLedgerAPI.getLedger();- expect(result.systems[0]?.last_seen).toBe('2026-03-23T11:59:50Z');+ expect(result.systems[0]?.latest_included_signal_at).toBe('2026-03-23T11:59:50Z');+ });++ it('falls back to the deprecated last_seen alias for older payloads', async () => {+ vi.mocked(apiFetchJSON).mockResolvedValueOnce({+ systems: [+ {+ name: 'Tower',+ type: 'host',+ status: 'warning',+ last_seen: '2026-03-23T11:59:50Z',+ source: 'multiple',+ },+ ],+ total: 1,+ limit: 5,+ });++ const result = await MonitoredSystemLedgerAPI.getLedger();++ expect(result.systems[0]?.latest_included_signal_at).toBe('2026-03-23T11:59:50Z');});it('preserves canonical status explanation reasons from the API contract', async () => {@@ -154,6 +178,7 @@ describe('MonitoredSystemLedgerAPI', () => {},],},+ latest_included_signal_at: '2026-03-23T11:59:50Z',last_seen: '2026-03-23T11:59:50Z',source: 'multiple',},@@ -184,6 +209,7 @@ describe('MonitoredSystemLedgerAPI', () => {name: 'server-1',type: 'host',status: 'degraded',+ latest_included_signal_at: '2026-01-01T00:00:00Z',last_seen: '2026-01-01T00:00:00Z',source: 'agent',},diff --git a/frontend-modern/src/api/monitoredSystemLedger.ts b/frontend-modern/src/api/monitoredSystemLedger.tsindex 5b92aab721..150f9c1afc 100644--- a/frontend-modern/src/api/monitoredSystemLedger.ts+++ b/frontend-modern/src/api/monitoredSystemLedger.ts@@ -46,7 +46,8 @@ export interface MonitoredSystemLedgerEntry {type: string;status: MonitoredSystemLedgerStatus;status_explanation?: MonitoredSystemLedgerStatusExplanation;- last_seen: string; // freshest included observation, RFC3339 or empty+ latest_included_signal_at: string; // freshest included observation, RFC3339 or empty+ last_seen?: string; // deprecated compatibility aliassource: string;explanation?: MonitoredSystemLedgerExplanation;}@@ -77,6 +78,8 @@ function normalizeMonitoredSystemLedgerEntry(return {...entry,status,+ latest_included_signal_at:+ entry.latest_included_signal_at?.trim() || entry.last_seen?.trim() || '',status_explanation: {summary: entry.status_explanation?.summary ?? defaultMonitoredSystemStatusExplanation(status),reasons: (entry.status_explanation?.reasons ?? []).map(normalizeMonitoredSystemLedgerStatusReason),diff --git a/frontend-modern/src/components/Settings/MonitoredSystemLedgerPanel.tsx b/frontend-modern/src/components/Settings/MonitoredSystemLedgerPanel.tsxindex 9bfdf221f1..682760ad99 100644--- a/frontend-modern/src/components/Settings/MonitoredSystemLedgerPanel.tsx+++ b/frontend-modern/src/components/Settings/MonitoredSystemLedgerPanel.tsx@@ -224,8 +224,8 @@ export function MonitoredSystemLedgerPanel(props: MonitoredSystemLedgerPanelProp</TableCell><TableCell><span class="text-xs text-muted">- {system.last_seen- ? formatRelativeTime(system.last_seen, { compact: true })+ {system.latest_included_signal_at+ ? formatRelativeTime(system.latest_included_signal_at, { compact: true }): '—'}</span></TableCell>diff --git a/frontend-modern/src/components/Settings/__tests__/MonitoredSystemLedgerPanel.test.tsx b/frontend-modern/src/components/Settings/__tests__/MonitoredSystemLedgerPanel.test.tsxindex a32227fb72..abf5a15ac4 100644--- a/frontend-modern/src/components/Settings/__tests__/MonitoredSystemLedgerPanel.test.tsx+++ b/frontend-modern/src/components/Settings/__tests__/MonitoredSystemLedgerPanel.test.tsx@@ -79,6 +79,7 @@ describe('MonitoredSystemLedgerPanel', () => {summary: 'All included top-level collection paths currently report online status.',reasons: [],},+ latest_included_signal_at: '2026-01-01T00:00:00Z',last_seen: '2026-01-01T00:00:00Z',source: 'agent',explanation: {@@ -142,6 +143,7 @@ describe('MonitoredSystemLedgerPanel', () => {summary: 'All included top-level collection paths currently report online status.',reasons: [],},+ latest_included_signal_at: '2026-01-01T00:00:00Z',last_seen: '2026-01-01T00:00:00Z',source: 'agent',explanation: {@@ -177,6 +179,7 @@ describe('MonitoredSystemLedgerPanel', () => {},],},+ latest_included_signal_at: '2026-01-02T00:00:00Z',last_seen: '2026-01-02T00:00:00Z',source: 'pbs',explanation: {@@ -261,6 +264,7 @@ describe('MonitoredSystemLedgerPanel', () => {summary: 'All included top-level collection paths currently report online status.',reasons: [],},+ latest_included_signal_at: '2026-01-01T00:00:00Z',last_seen: '2026-01-01T00:00:00Z',source: 'agent',},diff --git a/internal/api/contract_test.go b/internal/api/contract_test.goindex 5125e1f921..7e1962cb07 100644--- a/internal/api/contract_test.go+++ b/internal/api/contract_test.go@@ -594,8 +594,9 @@ func TestContract_MonitoredSystemLedgerJSONSnapshot(t *testing.T) {},},},- LastSeen: "2026-03-18T17:30:00Z",- Source: "agent",+ LatestIncludedSignalAt: "2026-03-18T17:30:00Z",+ LastSeen: "2026-03-18T17:30:00Z",+ Source: "agent",Explanation: MonitoredSystemLedgerExplanation{Summary: "Counts as one monitored system because Pulse sees one top-level host view from agent.",Reasons: []MonitoredSystemLedgerExplanationReason{@@ -644,6 +645,7 @@ func TestContract_MonitoredSystemLedgerJSONSnapshot(t *testing.T) {}]},+ "latest_included_signal_at":"2026-03-18T17:30:00Z","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 2d133ec572..dcfcdd31ae 100644--- a/internal/api/monitored_system_ledger.go+++ b/internal/api/monitored_system_ledger.go@@ -13,13 +13,14 @@ 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", "warning", "offline", "unknown"- StatusExplanation MonitoredSystemLedgerStatusExplanation `json:"status_explanation"`- LastSeen string `json:"last_seen"` // freshest included observation, 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"`+ LatestIncludedSignalAt string `json:"latest_included_signal_at"` // freshest included observation, RFC3339 or empty+ LastSeen string `json:"last_seen,omitempty"` // deprecated compatibility alias for latest_included_signal_at+ Source string `json:"source"`+ Explanation MonitoredSystemLedgerExplanation `json:"explanation"`}type MonitoredSystemLedgerStatusExplanation struct {@@ -118,13 +119,14 @@ func (r *Router) handleMonitoredSystemLedger(w http.ResponseWriter, req *http.Refor _, system := range systems {status := normalizeStatus(string(system.Status))entries = append(entries, MonitoredSystemLedgerEntry{- Name: system.Name,- Type: system.Type,- Status: status,- StatusExplanation: monitoredSystemLedgerStatusExplanation(system.StatusExplanation, status),- LastSeen: formatLastSeen(system.LastSeen),- Source: system.Source,- Explanation: monitoredSystemLedgerExplanation(system.Explanation),+ Name: system.Name,+ Type: system.Type,+ Status: status,+ StatusExplanation: monitoredSystemLedgerStatusExplanation(system.StatusExplanation, status),+ LatestIncludedSignalAt: formatLastSeen(system.LastSeen),+ LastSeen: formatLastSeen(system.LastSeen),+ Source: system.Source,+ Explanation: monitoredSystemLedgerExplanation(system.Explanation),})}diff --git a/internal/api/monitored_system_ledger_test.go b/internal/api/monitored_system_ledger_test.goindex 5712e9dfbd..4f5522207f 100644--- a/internal/api/monitored_system_ledger_test.go+++ b/internal/api/monitored_system_ledger_test.go@@ -19,8 +19,9 @@ func TestMonitoredSystemLedgerEntryTypes(t *testing.T) {Summary: "All included top-level collection paths currently report online status.",Reasons: []MonitoredSystemLedgerStatusReason{},},- LastSeen: "2025-01-01T00:00:00Z",- Source: "agent",+ LatestIncludedSignalAt: "2025-01-01T00:00:00Z",+ LastSeen: "2025-01-01T00:00:00Z",+ Source: "agent",Explanation: MonitoredSystemLedgerExplanation{Summary: "Counts as one monitored system because Pulse sees one top-level host view from agent.",Reasons: []MonitoredSystemLedgerExplanationReason{@@ -48,6 +49,9 @@ func TestMonitoredSystemLedgerEntryTypes(t *testing.T) {if decoded.StatusExplanation.Reasons == nil {t.Errorf("status explanation reasons mismatch: %+v", decoded.StatusExplanation)}+ if decoded.LatestIncludedSignalAt != "2025-01-01T00:00:00Z" {+ t.Errorf("latest included signal mismatch: %+v", decoded)+ }if decoded.Source != "agent" {t.Errorf("source mismatch: got %q", decoded.Source)}@@ -190,8 +194,9 @@ func TestHandleMonitoredSystemLedgerHTTP(t *testing.T) {Summary: "All included top-level collection paths currently report online status.",Reasons: []MonitoredSystemLedgerStatusReason{},},- LastSeen: "2025-01-01T00:00:00Z",- Source: "agent",+ LatestIncludedSignalAt: "2025-01-01T00:00:00Z",+ LastSeen: "2025-01-01T00:00:00Z",+ Source: "agent",Explanation: MonitoredSystemLedgerExplanation{Summary: "Counts as one monitored system because Pulse sees one top-level host view from agent.",Reasons: []MonitoredSystemLedgerExplanationReason{@@ -232,6 +237,9 @@ func TestHandleMonitoredSystemLedgerHTTP(t *testing.T) {if decoded.Systems[0].StatusExplanation.Reasons == nil {t.Errorf("expected status explanation reasons, got %+v", decoded.Systems[0].StatusExplanation)}+ if decoded.Systems[0].LatestIncludedSignalAt != "2025-01-01T00:00:00Z" {+ t.Errorf("expected latest included signal timestamp, got %+v", decoded.Systems[0])+ }if decoded.Systems[0].Explanation.Summary == "" {t.Errorf("expected explanation summary, got %+v", decoded.Systems[0].Explanation)}