KubeStateMetricsShardsMissing
critical

Description kube-state-metrics shards are missing, some Kubernetes objects are not being exposed.
Query for 15m
>>>
	
				
					2^
				
			
				
					
					
						max
					
				
			
				
					(
				
			
				
					
				
			
				
					{job="kube-state-metrics"}) by (cluster) - 1
  -

				
			
				
					
					
						sum
					
				
			
				
					( 2 ^ max by (cluster, shard_ordinal) (
				
			
				
					
				
			
				
					{job="kube-state-metrics"}) ) by (cluster)
!= 0

				
			
    
Query Explanation

The rule computes the difference between the expected set of shard identifiers (the bitmask 2^max(kube_state_metrics_total_shards)‑1, i.e., all bits up to the highest shard number set) and the actual shards that have reported (sum(2^kube_state_metrics_shard_ordinal)); if the result is non‑zero, at least one shard is missing, indicating that some Kubernetes objects are not being exposed by kube‑state‑metrics.

Get Alert
Download
Copy to Clipboard