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
perf: Use strconv.Itoa instead of fmt.Sprintf for int conversion
rcourtmanc81bbba8a38c
diff --git a/internal/monitoring/monitor.go b/internal/monitoring/monitor.goindex 22accaa6d6..0b1dee1dd0 100644--- a/internal/monitoring/monitor.go+++ b/internal/monitoring/monitor.go@@ -7264,7 +7264,7 @@ func buildGuestLookups(snapshot models.StateSnapshot, metadataStore *config.Gueskey := alerts.BuildGuestKey(vm.Instance, vm.Node, vm.VMID)byKey[key] = info- vmidKey := fmt.Sprintf("%d", vm.VMID)+ vmidKey := strconv.Itoa(vm.VMID)byVMID[vmidKey] = append(byVMID[vmidKey], info)// Persist last-known name and type for this guest@@ -7286,7 +7286,7 @@ func buildGuestLookups(snapshot models.StateSnapshot, metadataStore *config.GuesbyKey[key] = info}- vmidKey := fmt.Sprintf("%d", ct.VMID)+ vmidKey := strconv.Itoa(ct.VMID)byVMID[vmidKey] = append(byVMID[vmidKey], info)// Persist last-known name and type for this guest@@ -7320,7 +7320,7 @@ func enrichWithPersistedMetadata(metadataStore *config.GuestMetadataStore, byVMIcontinue // Invalid key format}- vmidKey := fmt.Sprintf("%d", vmid)+ vmidKey := strconv.Itoa(vmid)// Check if we already have a live entry for this exact guesthasLiveEntry := falsediff --git a/internal/monitoring/temperature.go b/internal/monitoring/temperature.goindex 7a2242ae54..e93da6ba2d 100644--- a/internal/monitoring/temperature.go+++ b/internal/monitoring/temperature.go@@ -259,7 +259,7 @@ func (tc *TemperatureCollector) runSSHCommand(ctx context.Context, host, command"-o", "BatchMode=yes","-o", "LogLevel=ERROR", // Suppress host key warnings that break JSON parsing"-o", "ConnectTimeout=5",- "-p", fmt.Sprintf("%d", tc.sshPort), // Use configured SSH port+ "-p", strconv.Itoa(tc.sshPort), // Use configured SSH port}if tc.hostKeys != nil && tc.hostKeys.Path() != "" {