Host context switching high
warning

Description Context switching is growing on the node (twice the daily average during the last 15m)
Query
>>>
	
				
					(
				
			
				
					
					
						rate
					
				
			
				
					(
				
			
				
					
				
			
				
					[15m])/count without(mode,cpu) (
				
			
				
					
				
			
				
					{mode="idle"})) / (
				
			
				
					
					
						rate
					
				
			
				
					(
				
			
				
					
				
			
				
					[1d])/count without(mode,cpu) (
				
			
				
					
				
			
				
					{mode="idle"})) > 2
				
			
    
Query Explanation

The rule computes the rate of context switches per CPU (using idle CPU time as a proxy for CPU count) over the last 15 minutes and divides it by the same metric averaged over the past day; if the recent value is more than twice the daily average, the alert fires, indicating a sudden spike in context‑switch activity on the node.

Get Alert
Download
Copy to Clipboard