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: standardize API version format and guest key separators
rcourtman1c22688d9b63
diff --git a/internal/alerts/alerts.go b/internal/alerts/alerts.goindex e0b8acac56..739836b84b 100644--- a/internal/alerts/alerts.go+++ b/internal/alerts/alerts.go@@ -4800,16 +4800,15 @@ func (m *Manager) CheckStorage(storage models.Storage) {}// BuildGuestKey constructs a unique key for a guest from instance, node, and VMID.+// Uses the canonical format: instance:node:vmid+// This matches the format used by makeGuestID in the monitoring package.func BuildGuestKey(instance, node string, vmid int) string {instance = strings.TrimSpace(instance)node = strings.TrimSpace(node)if instance == "" {instance = node}- if instance == node {- return fmt.Sprintf("%s-%d", node, vmid)- }- return fmt.Sprintf("%s-%s-%d", instance, node, vmid)+ return fmt.Sprintf("%s:%s:%d", instance, node, vmid)}// CheckSnapshotsForInstance evaluates guest snapshots for age-based alerts.diff --git a/internal/alerts/alerts_test.go b/internal/alerts/alerts_test.goindex 9aa30d1b97..903e7b4a23 100644--- a/internal/alerts/alerts_test.go+++ b/internal/alerts/alerts_test.go@@ -2871,35 +2871,35 @@ func TestBuildGuestKey(t *testing.T) {instance: "cluster-1",node: "pve-node",vmid: 100,- want: "cluster-1-pve-node-100",+ want: "cluster-1:pve-node:100",},{name: "same instance and node",instance: "pve-node",node: "pve-node",vmid: 200,- want: "pve-node-200",+ want: "pve-node:pve-node:200",},{name: "empty instance uses node",instance: "",node: "pve-node",vmid: 300,- want: "pve-node-300",+ want: "pve-node:pve-node:300",},{name: "whitespace instance uses node",instance: " ",node: "pve-node",vmid: 400,- want: "pve-node-400",+ want: "pve-node:pve-node:400",},{name: "instance with whitespace trimmed",instance: " cluster-1 ",node: "pve-node",vmid: 500,- want: "cluster-1-pve-node-500",+ want: "cluster-1:pve-node:500",},}diff --git a/internal/updates/manager.go b/internal/updates/manager.goindex 3c1683079a..cf463e2881 100644--- a/internal/updates/manager.go+++ b/internal/updates/manager.go@@ -333,7 +333,7 @@ func (m *Manager) CheckForUpdatesWithChannel(ctx context.Context, channel stringinfo := &UpdateInfo{Available: latestVer.IsNewerThan(currentVer),CurrentVersion: currentInfo.Version,- LatestVersion: release.TagName,+ LatestVersion: strings.TrimPrefix(release.TagName, "v"),ReleaseNotes: release.Body,ReleaseDate: release.PublishedAt,DownloadURL: downloadURL,