Skip to content

armgit / Pulse

Public Imported from GitHub
0

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.

Surface native TrueNAS runtime counts

rcourtmand4a4bc0c6239
diff --git a/docs/release-control/v6/internal/status.json b/docs/release-control/v6/internal/status.json
index 804e49c2ba..14d93e36ac 100644
--- a/docs/release-control/v6/internal/status.json
+++ b/docs/release-control/v6/internal/status.json
@@ -3552,6 +3552,57 @@
"kind": "file"
}
]
+ },
+ {
+ "id": "RA31",
+ "summary": "Platform overview inventory stays table-first: native provider facts belong in dense provider tables and governed platform tabs, not standalone summary-card strips or decorative card grids.",
+ "kind": "invariant",
+ "blocking_level": "repo-ready",
+ "proof_type": "automated",
+ "lane_ids": [
+ "L8",
+ "L21"
+ ],
+ "subsystem_ids": [
+ "frontend-primitives"
+ ],
+ "release_gate_ids": [],
+ "proof_commands": [
+ {
+ "id": "platform-overview-table-first-guardrails",
+ "run": [
+ "npm",
+ "--prefix",
+ "frontend-modern",
+ "test",
+ "--",
+ "--run",
+ "src/features/platformPage/__tests__/platformOverviewLayout.guardrails.test.ts"
+ ]
+ }
+ ],
+ "evidence": [
+ {
+ "repo": "pulse",
+ "path": "docs/release-control/v6/internal/status.json",
+ "kind": "file"
+ },
+ {
+ "repo": "pulse",
+ "path": "frontend-modern/src/features/platformPage/__tests__/platformOverviewLayout.guardrails.test.ts",
+ "kind": "file"
+ },
+ {
+ "repo": "pulse",
+ "path": "frontend-modern/src/features/truenas/TrueNASPageSurface.tsx",
+ "kind": "file"
+ },
+ {
+ "repo": "pulse",
+ "path": "frontend-modern/src/features/truenas/TrueNASSystemsTable.tsx",
+ "kind": "file"
+ }
+ ]
}
],
"evidence_reference_policy": {
diff --git a/docs/release-control/v6/internal/subsystems/api-contracts.md b/docs/release-control/v6/internal/subsystems/api-contracts.md
index 6138d9a762..4a8609b1dc 100644
--- a/docs/release-control/v6/internal/subsystems/api-contracts.md
+++ b/docs/release-control/v6/internal/subsystems/api-contracts.md
@@ -1509,6 +1509,12 @@ the canonical monitored-system blocked payload.
## Current State
+TrueNAS platform-connections responses treat native VMs and network shares as
+first-class observed contribution facets alongside systems, pools, datasets,
+apps, disks, and recovery artifacts. The frontend TrueNAS API client must
+normalize and preserve those fields for settings and platform handoffs instead
+of collapsing them into generic app, storage, or runtime counts.
+
The frontend `Node` API projection now carries optional `networkIn`,
`networkOut`, `diskRead`, and `diskWrite` fields so table consumers can align
Proxmox host rows with workload I/O columns. These fields are a read-model
@@ -2560,9 +2566,12 @@ operator-facing runtime summary for those configured connections. The list
response must carry the canonical redacted config together with poll health
(`intervalSeconds`, last success/failure, consecutive failures) and discovered
platform contribution summary (host/resource identity plus systems, pools,
-datasets, apps, disks, and recovery artifacts) so the platform-connections
+datasets, apps, VMs, shares, disks, and recovery artifacts) so the platform-connections
workspace can render real API-backed status and handoff context without
-inventing a settings-local shadow fetch path. Zero-value legacy
+inventing a settings-local shadow fetch path. `frontend-modern/src/api/truenas.ts`
+owns the browser normalizer for that observed summary and must preserve those
+native inventory facets instead of collapsing them into a generic app or
+storage count. Zero-value legacy
`pollIntervalSeconds` config must normalize back to the canonical 60-second
default at this same boundary instead of leaking ambiguous `0` values to the
frontend.
diff --git a/docs/release-control/v6/internal/subsystems/monitoring.md b/docs/release-control/v6/internal/subsystems/monitoring.md
index 9ab06afd2a..129db76d04 100644
--- a/docs/release-control/v6/internal/subsystems/monitoring.md
+++ b/docs/release-control/v6/internal/subsystems/monitoring.md
@@ -852,7 +852,7 @@ health and discovered-summary state for the settings platform-connections
surface. `internal/monitoring/truenas_poller.go` must honor each configured
TrueNAS connection's `pollIntervalSeconds`, keep the next poll schedule plus
last success/failure state in one canonical runtime owner, and project the most
-recent discovered host/pool/dataset/app/disk/recovery counts there instead of
+recent discovered host/pool/dataset/app/VM/share/disk/recovery counts there instead of
recomputing settings health panel-by-panel. That same poller-owned summary must
also absorb manual saved-connection test results from the shared
`POST /api/truenas/connections/{id}/test` path, so row-level operator tests in
@@ -1008,12 +1008,12 @@ capability or invent a TrueNAS-local sensor payload.
Taken together, this is the current monitoring-owned TrueNAS floor: one stored
API connection can surface one canonical top-level system, shared host
telemetry/history, app-container workloads, native VM workloads, disk
-health/history, and per-connection poll health without requiring the unified
-agent. The same poller/provider path also owns assistant-driven app
-start/stop, logs, and config refresh for canonical app workloads. Pulse does
-not promise a
-separate TrueNAS runtime model, broader NAS administration, or agent-required
-bootstrap at this floor.
+health/history, native network shares, and per-connection poll health plus
+observed contribution counts without requiring the unified agent. The same
+poller/provider path also owns assistant-driven app start/stop, logs, and
+config refresh for canonical app workloads. Pulse does not promise a separate
+TrueNAS runtime model, broader NAS administration, or agent-required bootstrap
+at this floor.
That same monitoring boundary now also owns VMware signal enrichment on the
canonical alert timeline. `internal/vmware/client_signals.go`,
`internal/vmware/provider.go`, and `internal/monitoring/monitor_alerts.go`
diff --git a/frontend-modern/src/api/__tests__/truenas.test.ts b/frontend-modern/src/api/__tests__/truenas.test.ts
index 183fa9726d..217194ff44 100644
--- a/frontend-modern/src/api/__tests__/truenas.test.ts
+++ b/frontend-modern/src/api/__tests__/truenas.test.ts
@@ -35,6 +35,8 @@ describe('TrueNASAPI', () => {
storagePools: 2,
datasets: 12,
apps: 4,
+ vms: 2,
+ shares: 3,
disks: 8,
recoveryArtifacts: 18,
},
@@ -70,6 +72,8 @@ describe('TrueNASAPI', () => {
storagePools: 2,
datasets: 12,
apps: 4,
+ vms: 2,
+ shares: 3,
disks: 8,
recoveryArtifacts: 18,
},
diff --git a/frontend-modern/src/api/truenas.ts b/frontend-modern/src/api/truenas.ts
index 398bcbcf30..d277ee1f99 100644
--- a/frontend-modern/src/api/truenas.ts
+++ b/frontend-modern/src/api/truenas.ts
@@ -44,6 +44,8 @@ export interface TrueNASConnectionObservedSummary {
storagePools: number;
datasets: number;
apps: number;
+ vms: number;
+ shares: number;
disks: number;
recoveryArtifacts: number;
}
@@ -125,6 +127,8 @@ const normalizeTrueNASConnectionObservedSummary = (
storagePools: finiteNumberOrUndefined(observed.storagePools) ?? 0,
datasets: finiteNumberOrUndefined(observed.datasets) ?? 0,
apps: finiteNumberOrUndefined(observed.apps) ?? 0,
+ vms: finiteNumberOrUndefined(observed.vms) ?? 0,
+ shares: finiteNumberOrUndefined(observed.shares) ?? 0,
disks: finiteNumberOrUndefined(observed.disks) ?? 0,
recoveryArtifacts: finiteNumberOrUndefined(observed.recoveryArtifacts) ?? 0,
};
diff --git a/frontend-modern/src/features/platformPage/__tests__/platformOverviewLayout.guardrails.test.ts b/frontend-modern/src/features/platformPage/__tests__/platformOverviewLayout.guardrails.test.ts
index d6fed5d4e8..cc93bb1deb 100644
--- a/frontend-modern/src/features/platformPage/__tests__/platformOverviewLayout.guardrails.test.ts
+++ b/frontend-modern/src/features/platformPage/__tests__/platformOverviewLayout.guardrails.test.ts
@@ -182,6 +182,12 @@ describe('platform overview layout guardrails', () => {
expect(proxmoxPageSurfaceSource).toContain('suppressNodeFilter');
});
+ it('keeps TrueNAS overview inventory in tables instead of summary cards', () => {
+ expect(truenasPageSurfaceSource).toContain('<TrueNASSystemsTable');
+ expect(truenasPageSurfaceSource).not.toContain('TrueNASInventorySummary');
+ expect(truenasPageSurfaceSource).not.toContain('data-truenas-summary-tile');
+ });
+
it('keeps secondary overview tables from rendering duplicate standalone toolbars', () => {
for (const source of [
dockerPageSurfaceSource,
diff --git a/frontend-modern/src/features/truenas/TrueNASSystemsTable.tsx b/frontend-modern/src/features/truenas/TrueNASSystemsTable.tsx
index 7644e6a29c..8ff8daa3db 100644
--- a/frontend-modern/src/features/truenas/TrueNASSystemsTable.tsx
+++ b/frontend-modern/src/features/truenas/TrueNASSystemsTable.tsx
@@ -43,8 +43,8 @@ import type { Resource } from '@/types/resource';
// TrueNAS systems are storage appliances, not generic compute hosts.
// The generic infrastructure table's CPU / Memory / Disk columns are
// helpful (the agent payload carries them), but operators also want at-
-// a-glance pool count, dataset count, share count, app count, uptime, version, and
-// max-sensor temperature on the same row. This bespoke table reuses
+// a-glance pool count, dataset count, share count, VM count, app count,
+// uptime, version, and max-sensor temperature on the same row. This bespoke table reuses
// canonical shared primitives (Card, Table, SearchInput,
// FilterButtonGroup, StatusDot) and counts the per-system children
// client-side from the same TrueNAS resource scope already fetched by
@@ -98,6 +98,7 @@ const EMPTY_COUNTS: TrueNASSystemChildCounts = {
pools: 0,
datasets: 0,
shares: 0,
+ vms: 0,
apps: 0,
disks: 0,
};
@@ -162,17 +163,17 @@ export const TrueNASSystemsTable: Component<{
>
<TableCard class={PLATFORM_TABLE_CARD_CLASS}>
<TableCardHeader title={props.title ?? 'Systems'} />
- <Table class="min-w-full table-fixed text-xs md:min-w-[1380px]">
+ <Table class="min-w-full table-fixed text-xs md:min-w-[1320px]">
<TableHeader>
<TableRow class={PLATFORM_TABLE_HEADER_ROW_CLASS}>
{/*
Desktop widths balance the bar-metric columns (CPU /
Memory / Storage) against the short integer-count columns
- (Pools / Datasets / Shares / Disks / Apps) and give Version the
+ (Pools / Datasets / Shares / VMs / Disks / Apps) and give Version the
room it needs for full "TrueNAS-SCALE-24.10.2"-style
labels. Mobile widths are unchanged.
*/}
- <TableHead class={`${getPlatformTableHeadClassForKind('name')} md:w-[13%]`}>
+ <TableHead class={`${getPlatformTableHeadClassForKind('name')} md:w-[10%]`}>
System
</TableHead>
<TableHead
@@ -183,10 +184,10 @@ export const TrueNASSystemsTable: Component<{
<TableHead class={`${getPlatformTableHeadClassForKind('metric-bar')} md:w-[10%]`}>
CPU
</TableHead>
- <TableHead class={`${getPlatformTableHeadClassForKind('metric-bar')} md:w-[11%]`}>
+ <TableHead class={`${getPlatformTableHeadClassForKind('metric-bar')} md:w-[10%]`}>
Memory
</TableHead>
- <TableHead class={`${getPlatformTableHeadClassForKind('metric-bar')} md:w-[12%]`}>
+ <TableHead class={`${getPlatformTableHeadClassForKind('metric-bar')} md:w-[11%]`}>
Storage
</TableHead>
<TableHead
@@ -214,6 +215,11 @@ export const TrueNASSystemsTable: Component<{
>
Shares
</TableHead>
+ <TableHead
+ class={`${getPlatformTableHeadClassForKind('numeric-value')} hidden md:table-cell md:w-[5%]`}
+ >
+ VMs
+ </TableHead>
<TableHead
class={`${getPlatformTableHeadClassForKind('numeric-value')} hidden md:table-cell md:w-[5%]`}
>
@@ -346,6 +352,11 @@ export const TrueNASSystemsTable: Component<{
>
{c().shares}
</TableCell>
+ <TableCell
+ class={`${getPlatformTableCellClassForKind('numeric-value')} hidden text-base-content tabular-nums md:table-cell`}
+ >
+ {c().vms}
+ </TableCell>
<TableCell
class={`${getPlatformTableCellClassForKind('numeric-value')} hidden text-base-content tabular-nums md:table-cell`}
>
@@ -361,7 +372,7 @@ export const TrueNASSystemsTable: Component<{
resource={system}
open={isExpanded()}
detailRowId={detailRowId()}
- colSpan={12}
+ colSpan={13}
resolveResourceLabel={resolveResourceLabel}
onClose={() => drawer.close(system)}
/>
diff --git a/frontend-modern/src/features/truenas/__tests__/truenasPageModel.test.ts b/frontend-modern/src/features/truenas/__tests__/truenasPageModel.test.ts
index ae88360d38..11c17e1cfa 100644
--- a/frontend-modern/src/features/truenas/__tests__/truenasPageModel.test.ts
+++ b/frontend-modern/src/features/truenas/__tests__/truenasPageModel.test.ts
@@ -141,6 +141,8 @@ describe('truenasPageModel', () => {
makeResource({ id: 'backup-share', type: 'network-share', parentId: backupDataset.id }),
makeResource({ id: 'primary-disk', type: 'physical_disk', parentId: primaryPool.id }),
makeResource({ id: 'backup-disk', type: 'physical_disk', parentId: backupPool.id }),
+ makeResource({ id: 'primary-vm', type: 'vm', parentId: primary.id }),
+ makeResource({ id: 'backup-vm', type: 'vm', parentId: backup.id }),
makeResource({ id: 'primary-app', type: 'app-container', parentId: primary.id }),
makeResource({ id: 'backup-app', type: 'app-container', parentId: backup.id }),
],
@@ -151,6 +153,7 @@ describe('truenasPageModel', () => {
pools: 1,
datasets: 1,
shares: 1,
+ vms: 1,
apps: 1,
disks: 1,
});
@@ -158,6 +161,7 @@ describe('truenasPageModel', () => {
pools: 1,
datasets: 1,
shares: 1,
+ vms: 1,
apps: 1,
disks: 1,
});
@@ -172,6 +176,7 @@ describe('truenasPageModel', () => {
makeResource({ id: 'dataset-media', type: 'storage', storage: { topology: 'dataset' } }),
makeResource({ id: 'share-media', type: 'network-share' }),
makeResource({ id: 'disk-sda', type: 'physical_disk' }),
+ makeResource({ id: 'vm-windows', type: 'vm' }),
makeResource({ id: 'app-nextcloud', type: 'app-container' }),
],
[system],
@@ -181,6 +186,7 @@ describe('truenasPageModel', () => {
pools: 1,
datasets: 1,
shares: 1,
+ vms: 1,
apps: 1,
disks: 1,
});
diff --git a/frontend-modern/src/features/truenas/truenasPageModel.ts b/frontend-modern/src/features/truenas/truenasPageModel.ts
index 443b8a213b..bcc48f4e24 100644
--- a/frontend-modern/src/features/truenas/truenasPageModel.ts
+++ b/frontend-modern/src/features/truenas/truenasPageModel.ts
@@ -86,6 +86,7 @@ export type TrueNASSystemChildCounts = {
pools: number;
datasets: number;
shares: number;
+ vms: number;
apps: number;
disks: number;
};
@@ -111,6 +112,7 @@ const emptyTrueNASSystemChildCounts = (): TrueNASSystemChildCounts => ({
pools: 0,
datasets: 0,
shares: 0,
+ vms: 0,
apps: 0,
disks: 0,
});
@@ -133,6 +135,7 @@ export function buildTrueNASPageModel(resources: Resource[]): TrueNASPageModel {
const shares = trueNasResources.filter((resource) => resource.type === 'network-share');
const vms = trueNasResources.filter((resource) => resource.type === 'vm');
const apps = trueNasResources.filter((resource) => resource.type === 'app-container');
+ const incidents = buildTrueNASIncidentRows(trueNasResources);
return {
resources: trueNasResources,
systems,
@@ -142,7 +145,7 @@ export function buildTrueNASPageModel(resources: Resource[]): TrueNASPageModel {
shares,
vms,
apps,
- incidents: buildTrueNASIncidentRows(trueNasResources),
+ incidents,
};
}
@@ -197,6 +200,8 @@ export function buildTrueNASSystemChildCounts(
counts.datasets += 1;
} else if (resource.type === 'network-share') {
counts.shares += 1;
+ } else if (resource.type === 'vm') {
+ counts.vms += 1;
} else if (resource.type === 'app-container') {
counts.apps += 1;
} else if (resource.type === 'physical_disk') {
diff --git a/internal/monitoring/truenas_poller.go b/internal/monitoring/truenas_poller.go
index f2d708cfd5..d3a6e23914 100644
--- a/internal/monitoring/truenas_poller.go
+++ b/internal/monitoring/truenas_poller.go
@@ -53,6 +53,8 @@ type TrueNASConnectionObservedSummary struct {
StoragePools int `json:"storagePools"`
Datasets int `json:"datasets"`
Apps int `json:"apps"`
+ VMs int `json:"vms"`
+ Shares int `json:"shares"`
Disks int `json:"disks"`
RecoveryArtifacts int `json:"recoveryArtifacts"`
}
@@ -780,6 +782,8 @@ func buildTrueNASObservedSummary(snapshot *truenas.FixtureSnapshot) *TrueNASConn
StoragePools: len(snapshot.Pools),
Datasets: len(snapshot.Datasets),
Apps: len(snapshot.Apps),
+ VMs: len(snapshot.VMs),
+ Shares: len(snapshot.Shares),
Disks: len(snapshot.Disks),
RecoveryArtifacts: len(snapshot.ZFSSnapshots) + len(snapshot.ReplicationTasks),
}
@@ -837,6 +841,8 @@ func cloneTrueNASObservedSummary(value *TrueNASConnectionObservedSummary) *TrueN
StoragePools: value.StoragePools,
Datasets: value.Datasets,
Apps: value.Apps,
+ VMs: value.VMs,
+ Shares: value.Shares,
Disks: value.Disks,
RecoveryArtifacts: value.RecoveryArtifacts,
}
diff --git a/internal/monitoring/truenas_poller_test.go b/internal/monitoring/truenas_poller_test.go
index bb6c906dd5..a977b77049 100644
--- a/internal/monitoring/truenas_poller_test.go
+++ b/internal/monitoring/truenas_poller_test.go
@@ -312,6 +312,43 @@ func TestTrueNASPollerConnectionSummariesExposeObservedCounts(t *testing.T) {
}
}
+func TestTrueNASObservedSummaryIncludesNativeRuntimeAndSharingFacets(t *testing.T) {
+ collectedAt := time.Date(2026, time.March, 30, 12, 0, 0, 0, time.UTC)
+ summary := buildTrueNASObservedSummary(&truenas.FixtureSnapshot{
+ CollectedAt: collectedAt,
+ System: truenas.SystemInfo{Hostname: "summary-native"},
+ Pools: []truenas.Pool{{Name: "tank"}},
+ Datasets: []truenas.Dataset{{Name: "tank/apps"}},
+ Apps: []truenas.App{{ID: "nextcloud"}, {ID: "adguard"}},
+ VMs: []truenas.VirtualMachine{{ID: "42"}, {ID: "43"}},
+ Shares: []truenas.NetworkShare{{ID: "smb-1"}, {ID: "nfs-1"}, {ID: "smb-2"}},
+ Disks: []truenas.Disk{{Name: "sda"}},
+ ZFSSnapshots: []truenas.ZFSSnapshot{
+ {ID: "tank/apps@auto-1"},
+ },
+ ReplicationTasks: []truenas.ReplicationTask{
+ {ID: "replicate-tank-apps"},
+ },
+ })
+
+ if summary == nil {
+ t.Fatal("expected observed summary")
+ }
+ if summary.Systems != 1 ||
+ summary.StoragePools != 1 ||
+ summary.Datasets != 1 ||
+ summary.Apps != 2 ||
+ summary.VMs != 2 ||
+ summary.Shares != 3 ||
+ summary.Disks != 1 ||
+ summary.RecoveryArtifacts != 2 {
+ t.Fatalf("unexpected native observed counts: %+v", summary)
+ }
+ if summary.CollectedAt == nil || !summary.CollectedAt.Equal(collectedAt) {
+ t.Fatalf("expected collectedAt %s, got %+v", collectedAt, summary.CollectedAt)
+ }
+}
+
func TestTrueNASPollerConnectionSummariesCaptureFailures(t *testing.T) {
previous := truenas.IsFeatureEnabled()
truenas.SetFeatureEnabled(true)