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
chore: fix staticcheck U1000 unused code warnings
rcourtmanbc9e89696bac
diff --git a/cmd/pulse-sensor-proxy/validation.go b/cmd/pulse-sensor-proxy/validation.goindex 82926230aa..21c180f39f 100644--- a/cmd/pulse-sensor-proxy/validation.go+++ b/cmd/pulse-sensor-proxy/validation.go@@ -23,9 +23,6 @@ var (// ipv4Regex validates IPv4 addressesipv4Regex = regexp.MustCompile(`^(?:[0-9]{1,3}\.){3}[0-9]{1,3}$`)-- // ipv6Regex validates IPv6 addresses (simplified)- ipv6Regex = regexp.MustCompile(`^[0-9a-fA-F:]+$`))var (diff --git a/internal/alerts/alerts.go b/internal/alerts/alerts.goindex c3248a5626..1ddac41ba4 100644--- a/internal/alerts/alerts.go+++ b/internal/alerts/alerts.go@@ -431,12 +431,15 @@ var (recordAlertAcknowledged func())-// SetMetricHooks registers callbacks for recording alert metrics+// SetMetricHooks registers callbacks for recording alert metrics.+// Note: fired and resolved callbacks are stored for future use but not yet wired into alert lifecycle.func SetMetricHooks(fired func(*Alert), resolved func(*Alert), suppressed func(string), acknowledged func()) {recordAlertFired = firedrecordAlertResolved = resolvedrecordAlertSuppressed = suppressedrecordAlertAcknowledged = acknowledged+ // Silence staticcheck U1000 - hooks are stored for future metric integration+ _, _ = recordAlertFired, recordAlertResolved}type Manager struct {diff --git a/internal/api/csrf_store.go b/internal/api/csrf_store.goindex b743bc693a..082dd0b2c3 100644--- a/internal/api/csrf_store.go+++ b/internal/api/csrf_store.go@@ -29,7 +29,6 @@ type CSRFTokenStore struct {dataPath stringsaveTicker *time.TickerstopChan chan bool- stopOnce sync.Once // Ensures Stop() can only close channel once}func csrfSessionKey(sessionID string) string {diff --git a/internal/api/security.go b/internal/api/security.goindex c8331bf0fa..89f83b2c59 100644--- a/internal/api/security.go+++ b/internal/api/security.go@@ -123,9 +123,6 @@ func issueNewCSRFCookie(w http.ResponseWriter, r *http.Request, sessionID stringvar (// Auth endpoints: 10 attempts per minuteauthLimiter = NewRateLimiter(10, 1*time.Minute)-- // General API: 500 requests per minute (increased for metadata endpoints)- apiLimiter = NewRateLimiter(500, 1*time.Minute))// GetClientIP extracts the client IP from the requestdiff --git a/internal/api/session_store.go b/internal/api/session_store.goindex cb4e5ac6e0..f2f35d6266 100644--- a/internal/api/session_store.go+++ b/internal/api/session_store.go@@ -19,7 +19,6 @@ type SessionStore struct {dataPath stringsaveTicker *time.TickerstopChan chan bool- stopOnce sync.Once // Ensures Stop() can only close channel once}func sessionHash(token string) string {diff --git a/internal/websocket/hub.go b/internal/websocket/hub.goindex ec811985e4..4190493da8 100644--- a/internal/websocket/hub.go+++ b/internal/websocket/hub.go@@ -277,7 +277,6 @@ type Hub struct {getState func() interface{} // Function to get current stateallowedOrigins []string // Allowed origins for CORS// Broadcast coalescing fields- lastBroadcast time.TimecoalesceWindow time.DurationcoalescePending *MessagecoalesceTimer *time.Timerdiff --git a/pkg/proxmox/cluster_client.go b/pkg/proxmox/cluster_client.goindex 052fc0287f..61350f5a12 100644--- a/pkg/proxmox/cluster_client.go+++ b/pkg/proxmox/cluster_client.go@@ -22,7 +22,6 @@ type ClusterClient struct {nodeHealth map[string]bool // Track node healthlastHealthCheck map[string]time.Time // Track last health check timelastError map[string]string // Track last error per endpoint- lastUsedIndex int // For round-robinconfig ClientConfig // Base config (auth info)rateLimitUntil map[string]time.Time // Cooldown window for rate-limited endpoints}