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.

Add retry logic for guest agent filesystem info in efficient polling

rcourtmandc94f6092a0d
diff --git a/internal/monitoring/monitor.go b/internal/monitoring/monitor.go
index 60a2f8797e..21d70980d8 100644
--- a/internal/monitoring/monitor.go
+++ b/internal/monitoring/monitor.go
@@ -6131,7 +6131,16 @@ func (m *Monitor) pollVMsAndContainersEfficient(ctx context.Context, instanceNam
Uint64("current_maxdisk", diskTotal).
Msg("Guest agent enabled, querying filesystem info for accurate disk usage")
- fsInfo, err := client.GetVMFSInfo(ctx, res.Node, res.VMID)
+ // Use retry logic for guest agent calls to handle transient timeouts (refs #630)
+ fsInfoRaw, err := m.retryGuestAgentCall(ctx, m.guestAgentFSInfoTimeout, m.guestAgentRetries, func(ctx context.Context) (interface{}, error) {
+ return client.GetVMFSInfo(ctx, res.Node, res.VMID)
+ })
+ var fsInfo []proxmox.VMFileSystem
+ if err == nil {
+ if fs, ok := fsInfoRaw.([]proxmox.VMFileSystem); ok {
+ fsInfo = fs
+ }
+ }
if err != nil {
// Log more helpful error messages based on the error type
errMsg := err.Error()