From f4ead79c825483f9beacd30f00cd2a53629dc93e Mon Sep 17 00:00:00 2001 From: rcourtman Date: Wed, 22 Oct 2025 22:27:19 +0000 Subject: [PATCH] Ensure LXC drawers populate without metrics (#596) --- internal/monitoring/monitor.go | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/internal/monitoring/monitor.go b/internal/monitoring/monitor.go index 240ee03..49c19f2 100644 --- a/internal/monitoring/monitor.go +++ b/internal/monitoring/monitor.go @@ -1965,9 +1965,6 @@ func ensureContainerRootDiskEntry(container *models.Container) { total := container.Disk.Total used := container.Disk.Used - if total <= 0 && used <= 0 { - return - } if total > 0 && used > total { used = total } @@ -2003,9 +2000,6 @@ func convertContainerDiskInfo(status *proxmox.Container) []models.Disk { for name, info := range status.DiskInfo { total := clampToInt64(info.Total) used := clampToInt64(info.Used) - if total <= 0 && used <= 0 { - continue - } if total > 0 && used > total { used = total } @@ -2127,11 +2121,16 @@ func sanitizeGuestAddressStrings(value string) []string { return results } - if strings.HasPrefix(value, "127.") || strings.HasPrefix(strings.ToLower(value), "0.0.0.0") { - return nil + if idx := strings.Index(value, "/"); idx > 0 { + value = strings.TrimSpace(value[:idx]) } lower = strings.ToLower(value) + + if strings.HasPrefix(value, "127.") || strings.HasPrefix(lower, "0.0.0.0") { + return nil + } + if strings.HasPrefix(lower, "fe80") { return nil }