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.

Complete Unraid monitoring contract

pulse-triage[bot]f5f854afa226
diff --git a/docs/release-control/v6/internal/subsystems/agent-lifecycle.md b/docs/release-control/v6/internal/subsystems/agent-lifecycle.md
index c294eabd85..c7275bf352 100644
--- a/docs/release-control/v6/internal/subsystems/agent-lifecycle.md
+++ b/docs/release-control/v6/internal/subsystems/agent-lifecycle.md
@@ -1224,6 +1224,9 @@ topology labels such as `disk6` or `parity2`. Assigned disks may use
`diskId`/`rdevId` as the serial fallback when Unraid does not expose a separate
serial field, so monitoring receives stable disk identity without inventing
host-profile or platform state from optional storage probe success.
+Monitoring ingest must apply the same evidence filter to reports from deployed
+older agents, then make the remaining structured member and parity statuses
+authoritative over stale aggregate failure and protection counters.
That Unraid runtime path must also prefer native appliance topology over
generic block-device inference. The Unified Agent should best-effort merge
`/var/local/emhttp/disks.ini` into the `mdcmd status` view and carry disk
diff --git a/docs/release-control/v6/internal/subsystems/monitoring.md b/docs/release-control/v6/internal/subsystems/monitoring.md
index dfe8d03629..a6141c7b9e 100644
--- a/docs/release-control/v6/internal/subsystems/monitoring.md
+++ b/docs/release-control/v6/internal/subsystems/monitoring.md
@@ -1554,10 +1554,18 @@ signal.
The same monitoring compatibility boundary owns Unraid slot filtering and
operator health posture after host-agent ingest. Empty no-present Unraid slots
must be removed before storage-risk assessment so unassigned array capacity is
-not reported as missing or disabled media. An Unraid array with assigned data
-disks but no configured parity is an attention/warning posture with the
-machine-readable `unraid_no_parity` reason, while active parity check/sync
-state remains a separate `unraid_sync_active` reason. Realtime resource
+not reported as missing or disabled media. Unraid topology labels such as
+`disk6` and `parity2` are not assignment evidence by themselves: a
+`DISK_NP`/`DISK_NP_DSBL` member remains reportable as genuinely missing only
+when device, model/serial identity, filesystem, or size evidence shows that a
+disk was assigned. After filtering, structured member statuses override stale
+aggregate missing/disabled/invalid counters, and structured parity status
+overrides the aggregate protected-parity count. This normalization belongs at
+server ingest as well as agent collection so deployed older agents stop
+creating false health alerts without waiting for an agent upgrade. An Unraid
+array with assigned data disks but no configured parity is an attention/warning
+posture with the machine-readable `unraid_no_parity` reason, while active parity
+check/sync state remains a separate `unraid_sync_active` reason. Realtime resource
broadcasts must preserve canonical identity, discovery target, metrics target,
incident rollups, and raw `agent`/`storage` facet payloads so frontend
infrastructure surfaces can explain degraded/warning rows without falling back
diff --git a/internal/monitoring/monitor_agents.go b/internal/monitoring/monitor_agents.go
index 44d0c461a4..ee7dbfe21e 100644
--- a/internal/monitoring/monitor_agents.go
+++ b/internal/monitoring/monitor_agents.go
@@ -2936,7 +2936,7 @@ func (m *Monitor) ApplyHostReport(report agentshost.Report, tokenRecord *config.
if syncAction == "" {
syncProgress = 0
}
- numProtected, numDisabled, numInvalid, numMissing := reconcileLegacyUnraidCounts(report.Unraid, disks)
+ numProtected, numDisabled, numInvalid, numMissing := reconcileReportedUnraidCounts(report.Unraid, disks)
unraidData = &models.HostUnraidStorage{
ArrayStarted: report.Unraid.ArrayStarted,
ArrayState: strings.TrimSpace(report.Unraid.ArrayState),
@@ -3675,7 +3675,10 @@ func isLegacyUnraidEmptySlot(disk agentshost.UnraidDisk, normalizedStatus string
disk.SizeBytes == 0
}
-func reconcileLegacyUnraidCounts(storage *agentshost.UnraidStorage, disks []models.HostUnraidDisk) (protected, disabled, invalid, missing int) {
+// reconcileReportedUnraidCounts makes the filtered per-disk topology
+// authoritative when an agent supplied structured statuses. This also repairs
+// stale aggregate counters from older agents at the server ingestion boundary.
+func reconcileReportedUnraidCounts(storage *agentshost.UnraidStorage, disks []models.HostUnraidDisk) (protected, disabled, invalid, missing int) {
protected = storage.NumProtected
disabled = storage.NumDisabled
invalid = storage.NumInvalid
diff --git a/internal/monitoring/monitor_host_agents_test.go b/internal/monitoring/monitor_host_agents_test.go
index eb4c9125a8..a0ccdfb4d8 100644
--- a/internal/monitoring/monitor_host_agents_test.go
+++ b/internal/monitoring/monitor_host_agents_test.go
@@ -2439,6 +2439,12 @@ func TestApplyHostReportFiltersLegacyUnraidEmptySlots(t *testing.T) {
t.Fatalf("unexpected assigned disk: %+v", disk)
}
}
+ assessment := storagehealth.AssessUnraidStorage(*host.Unraid)
+ for _, reason := range assessment.Reasons {
+ if reason.Code == "unraid_missing_disks" || reason.Code == "unraid_disabled_disks" || reason.Code == "unraid_invalid_disks" {
+ t.Fatalf("named empty slots produced a failure assessment: %+v", assessment.Reasons)
+ }
+ }
}
func TestApplyHostReportFiltersVendorManagedSystemRAIDArrays(t *testing.T) {