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: mark unused parameters to satisfy unparam linter
rcourtman815219720750
diff --git a/internal/alerts/alerts.go b/internal/alerts/alerts.goindex 54514d4388..f7a6fc78a4 100644--- a/internal/alerts/alerts.go+++ b/internal/alerts/alerts.go@@ -6839,7 +6839,7 @@ func calculateTrimmedBaseline(samples []float64) (baseline float64, trustworthy}// checkPMGAnomalies detects spam/virus rate anomalies using trimmed baseline-func (m *Manager) checkPMGAnomalies(pmg models.PMGInstance, defaults PMGThresholdConfig) {+func (m *Manager) checkPMGAnomalies(pmg models.PMGInstance, _ PMGThresholdConfig) {// Need mail count dataif len(pmg.MailCount) == 0 {returndiff --git a/internal/api/config_handlers.go b/internal/api/config_handlers.goindex bfc9b4d560..0aa737366c 100644--- a/internal/api/config_handlers.go+++ b/internal/api/config_handlers.go@@ -5997,7 +5997,7 @@ func (h *ConfigHandlers) HandleAutoRegister(w http.ResponseWriter, r *http.Reque}// handleSecureAutoRegister handles the new secure registration flow where Pulse generates the token-func (h *ConfigHandlers) handleSecureAutoRegister(w http.ResponseWriter, r *http.Request, req *AutoRegisterRequest, clientIP string) {+func (h *ConfigHandlers) handleSecureAutoRegister(w http.ResponseWriter, _ *http.Request, req *AutoRegisterRequest, clientIP string) {log.Info().Str("type", req.Type).Str("host", req.Host).diff --git a/internal/api/diagnostics.go b/internal/api/diagnostics.goindex 972070bf67..94b59c5542 100644--- a/internal/api/diagnostics.go+++ b/internal/api/diagnostics.go@@ -1451,7 +1451,7 @@ func normalizeVersionLabel(raw string) string {}// checkVMDiskMonitoring performs diagnostic checks for VM disk monitoring-func (r *Router) checkVMDiskMonitoring(ctx context.Context, client *proxmox.Client, nodeName string) *VMDiskCheckResult {+func (r *Router) checkVMDiskMonitoring(ctx context.Context, client *proxmox.Client, _ string) *VMDiskCheckResult {result := &VMDiskCheckResult{Recommendations: []string{},Permissions: []string{},@@ -1716,7 +1716,7 @@ func (r *Router) checkVMDiskMonitoring(ctx context.Context, client *proxmox.Clie}// checkPhysicalDisks performs diagnostic checks for physical disk detection-func (r *Router) checkPhysicalDisks(ctx context.Context, client *proxmox.Client, instanceName string) *PhysicalDiskCheck {+func (r *Router) checkPhysicalDisks(ctx context.Context, client *proxmox.Client, _ string) *PhysicalDiskCheck {result := &PhysicalDiskCheck{Recommendations: []string{},NodeResults: []NodeDiskResult{},diff --git a/internal/api/router.go b/internal/api/router.goindex a796abd95d..36c8b34a96 100644--- a/internal/api/router.go+++ b/internal/api/router.go@@ -3591,7 +3591,7 @@ func (r *Router) tryServeHostAgentBinary(w http.ResponseWriter, req *http.RequescheckedPaths = append(checkedPaths, path)if info, err := os.Stat(path); err == nil && !info.IsDir() {if strings.HasSuffix(req.URL.Path, ".sha256") {- r.serveChecksum(w, req, path)+ r.serveChecksum(w, path)return checkedPaths, true}http.ServeFile(w, req, path)@@ -3663,7 +3663,7 @@ func sortedHostAgentKeys(missing map[string]agentbinaries.HostAgentBinary) []str}// serveChecksum computes and serves the SHA256 checksum of a file-func (r *Router) serveChecksum(w http.ResponseWriter, req *http.Request, filepath string) {+func (r *Router) serveChecksum(w http.ResponseWriter, filepath string) {file, err := os.Open(filepath)if err != nil {http.Error(w, "Failed to open file", http.StatusInternalServerError)diff --git a/internal/api/security_oidc.go b/internal/api/security_oidc.goindex a11f159b05..9b07f4fd2c 100644--- a/internal/api/security_oidc.go+++ b/internal/api/security_oidc.go@@ -21,7 +21,7 @@ func (r *Router) handleOIDCConfig(w http.ResponseWriter, req *http.Request) {}}-func (r *Router) handleGetOIDCConfig(w http.ResponseWriter, req *http.Request) {+func (r *Router) handleGetOIDCConfig(w http.ResponseWriter, _ *http.Request) {cfg := r.ensureOIDCConfig()response := makeOIDCResponse(cfg, r.config.PublicURL)diff --git a/internal/api/system_settings.go b/internal/api/system_settings.goindex be92cb1299..41c2c6420c 100644--- a/internal/api/system_settings.go+++ b/internal/api/system_settings.go@@ -119,7 +119,7 @@ func discoveryConfigMap(raw map[string]interface{}) (map[string]interface{}, boo}// validateSystemSettings validates settings before applying them-func validateSystemSettings(settings *config.SystemSettings, rawRequest map[string]interface{}) error {+func validateSystemSettings(_ *config.SystemSettings, rawRequest map[string]interface{}) error {if val, ok := rawRequest["pvePollingInterval"]; ok {if interval, ok := val.(float64); ok {if interval <= 0 {diff --git a/internal/dockeragent/agent.go b/internal/dockeragent/agent.goindex 13b2823d0c..2bf18be597 100644--- a/internal/dockeragent/agent.go+++ b/internal/dockeragent/agent.go@@ -1020,7 +1020,7 @@ func (a *Agent) sendReport(ctx context.Context, report agentsdocker.Report) erroreturn nil}-func (a *Agent) sendReportToTarget(ctx context.Context, target TargetConfig, payload []byte, containerCount int) error {+func (a *Agent) sendReportToTarget(ctx context.Context, target TargetConfig, payload []byte, _ int) error {url := fmt.Sprintf("%s/api/agents/docker/report", target.URL)req, err := http.NewRequestWithContext(ctx, http.MethodPost, url, bytes.NewReader(payload))if err != nil {diff --git a/internal/monitoring/monitor.go b/internal/monitoring/monitor.goindex 3fba8164bd..3c45e6ed05 100644--- a/internal/monitoring/monitor.go+++ b/internal/monitoring/monitor.go@@ -624,7 +624,6 @@ func safePercentage(used, total float64) float64 {return result}-// safeFloat ensures a float value is not NaN or Inffunc safeFloat(val float64) float64 {if math.IsNaN(val) || math.IsInf(val, 0) {@@ -4572,7 +4571,7 @@ func (m *Monitor) retryFailedConnections(ctx context.Context) {}// poll fetches data from all configured instances-func (m *Monitor) poll(ctx context.Context, wsHub *websocket.Hub) {+func (m *Monitor) poll(_ context.Context, wsHub *websocket.Hub) {defer recoverFromPanic("poll")// Limit concurrent polls to 2 to prevent resource exhaustion@@ -4788,7 +4787,7 @@ func derivePollTimeout(cfg *config.Config) time.Duration {return timeout}-func (m *Monitor) taskExecutionTimeout(instanceType InstanceType) time.Duration {+func (m *Monitor) taskExecutionTimeout(_ InstanceType) time.Duration {if m == nil {return defaultTaskTimeout}