diff --git a/lib/auth/auth.go b/lib/auth/auth.go index 7e1a31640cdaa..dedda21f57012 100644 --- a/lib/auth/auth.go +++ b/lib/auth/auth.go @@ -1394,8 +1394,6 @@ func (a *Server) runPeriodicOperations() { defer ticker.Stop() - missedKeepAliveCount := 0 - // Prevent some periodic operations from running for dashboard tenants. if !services.IsDashboard(*modules.GetModules().Features().ToProto()) { ticker.Push(interval.SubInterval[periodicIntervalKey]{ @@ -1497,7 +1495,7 @@ func (a *Server) runPeriodicOperations() { return false, nil } if services.NodeHasMissedKeepAlives(srv) { - missedKeepAliveCount++ + heartbeatsMissedByAuth.Inc() } // TODO(tross) DELETE in v20.0.0 - all invalid hostnames should have been sanitized by then. @@ -1535,9 +1533,6 @@ func (a *Server) runPeriodicOperations() { break } } - - // Update prometheus gauge - heartbeatsMissedByAuth.Set(float64(missedKeepAliveCount)) }() case metricsKey: go a.updateAgentMetrics()