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: use configured memory (MaxMem) instead of balloon for VM total

rcourtman1f4f0472b096
diff --git a/internal/monitoring/monitor.go b/internal/monitoring/monitor.go
index a0edf18495..a33e16b036 100644
--- a/internal/monitoring/monitor.go
+++ b/internal/monitoring/monitor.go
@@ -6282,12 +6282,14 @@ func (m *Monitor) pollVMsAndContainersEfficient(ctx context.Context, instanceNam
networkInBytes = int64(detailedStatus.NetIn)
networkOutBytes = int64(detailedStatus.NetOut)
- if detailedStatus.Balloon > 0 && detailedStatus.Balloon < detailedStatus.MaxMem {
- memTotal = detailedStatus.Balloon
- guestRaw.DerivedFromBall = true
- } else if detailedStatus.MaxMem > 0 {
+ // Note: We intentionally do NOT override memTotal with balloon.
+ // The balloon value is tracked separately in memory.balloon for
+ // visualization purposes. Using balloon as total causes user
+ // confusion (showing 1GB/1GB at 100% when VM is configured for 4GB)
+ // and makes the frontend's balloon marker logic ineffective.
+ // Refs: #1070
+ if detailedStatus.MaxMem > 0 {
memTotal = detailedStatus.MaxMem
- guestRaw.DerivedFromBall = false
}
switch {
diff --git a/internal/monitoring/monitor_polling.go b/internal/monitoring/monitor_polling.go
index 7ffb8a1cc6..d2ef9b3c0a 100644
--- a/internal/monitoring/monitor_polling.go
+++ b/internal/monitoring/monitor_polling.go
@@ -352,10 +352,12 @@ func (m *Monitor) pollVMsWithNodes(ctx context.Context, instanceName string, clu
}
}
}
- if vmStatus.Balloon > 0 && vmStatus.Balloon < vmStatus.MaxMem {
- memTotal = vmStatus.Balloon
- guestRaw.DerivedFromBall = true
- }
+ // Note: We intentionally do NOT override memTotal with balloon.
+ // The balloon value is tracked separately in memory.balloon for
+ // visualization purposes. Using balloon as total causes user
+ // confusion (showing 1GB/1GB at 100% when VM is configured for 4GB)
+ // and makes the frontend's balloon marker logic ineffective.
+ // Refs: #1070
switch {
case memAvailable > 0:
if memAvailable > memTotal {