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: enable backup monitoring for PVE instances via config migration
rcourtman896b5bfc89b8
diff --git a/internal/config/persistence.go b/internal/config/persistence.goindex fc99b75fe1..9fa0a97d5a 100644--- a/internal/config/persistence.go+++ b/internal/config/persistence.go@@ -1387,6 +1387,16 @@ func (c *ConfigPersistence) LoadNodesConfig() (*NodesConfig, error) {migrationApplied = true}}++ // Migration: Ensure MonitorBackups is enabled for PVE instances+ // This fixes issue #1139 where PVE backups weren't showing+ if !config.PVEInstances[i].MonitorBackups {+ log.Info().+ Str("instance", config.PVEInstances[i].Name).+ Msg("Enabling MonitorBackups for PVE instance (was disabled)")+ config.PVEInstances[i].MonitorBackups = true+ migrationApplied = true+ }}// Fix for bug where TokenName was incorrectly set when using password authdiff --git a/internal/config/persistence_test.go b/internal/config/persistence_test.goindex 3b6e6b23b0..0255ec578e 100644--- a/internal/config/persistence_test.go+++ b/internal/config/persistence_test.go@@ -2355,3 +2355,41 @@ func TestPersistence_EnvConfigSuppressions(t *testing.T) {t.Fatal("Expected error on invalid JSON")}}++func TestLoadNodesConfig_PVEMonitorBackupsMigration(t *testing.T) {+ tempDir := t.TempDir()+ cp := config.NewConfigPersistence(tempDir)+ if err := cp.EnsureConfigDir(); err != nil {+ t.Fatalf("EnsureConfigDir: %v", err)+ }++ // Save PVE instance with MonitorBackups=false (simulating old config or missing field)+ pveInstances := []config.PVEInstance{+ {+ Name: "pve-no-backups",+ Host: "https://pve.local:8006",+ User: "root@pam",+ Password: "secret",+ MonitorBackups: false, // This should be migrated to true+ },+ }++ if err := cp.SaveNodesConfig(pveInstances, nil, nil); err != nil {+ t.Fatalf("SaveNodesConfig: %v", err)+ }++ loaded, err := cp.LoadNodesConfig()+ if err != nil {+ t.Fatalf("LoadNodesConfig: %v", err)+ }++ if len(loaded.PVEInstances) != 1 {+ t.Fatalf("expected 1 PVE instance, got %d", len(loaded.PVEInstances))+ }++ pve := loaded.PVEInstances[0]+ // MonitorBackups should be migrated to true+ if !pve.MonitorBackups {+ t.Errorf("expected MonitorBackups to be migrated to true, got false")+ }+}