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
Fix Docker CPU calculation on systemUsage counter reset
rcourtmanb5798012fc20
diff --git a/internal/dockeragent/agent.go b/internal/dockeragent/agent.goindex 7c2f3a9159..942e4a0714 100644--- a/internal/dockeragent/agent.go+++ b/internal/dockeragent/agent.go@@ -1377,9 +1377,9 @@ func (a *Agent) calculateContainerCPUPercent(id string, stats containertypes.Stavar systemDelta float64if current.systemUsage >= prev.systemUsage {systemDelta = float64(current.systemUsage - prev.systemUsage)- } else if current.systemUsage > 0 {- systemDelta = float64(current.systemUsage)}+ // If systemUsage went backward (counter reset), leave systemDelta as 0+ // to fall through to time-based calculation belowif systemDelta > 0 {cpuPercent := safeFloat((totalDelta / systemDelta) * float64(onlineCPUs) * 100.0)