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.

fix: Physical disk temps showing 0°C when using host agent SMART data

rcourtmanb039b79e4a9c
diff --git a/internal/monitoring/monitor.go b/internal/monitoring/monitor.go
index 18078d70e5..437305c0a9 100644
--- a/internal/monitoring/monitor.go
+++ b/internal/monitoring/monitor.go
@@ -5650,9 +5650,11 @@ func (m *Monitor) pollPVEInstance(ctx context.Context, instanceName string, clie
}
}
if len(existing) > 0 {
- updated := mergeNVMeTempsIntoDisks(existing, modelNodes)
+ // Use nodes from state snapshot - they have LinkedHostAgentID populated
+ // (the local modelNodes variable doesn't have this field set)
+ updated := mergeNVMeTempsIntoDisks(existing, currentState.Nodes)
// Also merge SMART data from linked host agents
- updated = mergeHostAgentSMARTIntoDisks(updated, modelNodes, currentState.Hosts)
+ updated = mergeHostAgentSMARTIntoDisks(updated, currentState.Nodes, currentState.Hosts)
m.state.UpdatePhysicalDisks(instanceName, updated)
}
} else {
@@ -5803,9 +5805,11 @@ func (m *Monitor) pollPVEInstance(ctx context.Context, instanceName string, clie
}
}
- allDisks = mergeNVMeTempsIntoDisks(allDisks, modelNodesCopy)
+ // Use nodes from state snapshot - they have LinkedHostAgentID populated
+ // (modelNodesCopy passed to this goroutine doesn't have this field set)
+ allDisks = mergeNVMeTempsIntoDisks(allDisks, currentState.Nodes)
// Also merge SMART data from linked host agents
- allDisks = mergeHostAgentSMARTIntoDisks(allDisks, modelNodesCopy, currentState.Hosts)
+ allDisks = mergeHostAgentSMARTIntoDisks(allDisks, currentState.Nodes, currentState.Hosts)
// Update physical disks in state
log.Debug().