HAProxy high HTTP 4xx error rate backend
critical

Description Too many HTTP requests with status 4xx (> 5%) on backend {{ $labels.fqdn }}/{{ $labels.backend }}
Query for 1m
>>>
	
				
					((sum by (proxy) (
				
			
				
					
					
						rate
					
				
			
				
					(
				
			
				
					
				
			
				
					{code="4xx"}[1m])) / sum by (proxy) (
				
			
				
					
					
						rate
					
				
			
				
					(
				
			
				
					
				
			
				
					[1m]))) * 100) > 5
				
			
    
Query Explanation

The query computes, for each HAProxy proxy, the percentage of HTTP responses with a 4xx status over the last minute by dividing the 1‑minute rate of haproxy_server_http_responses_total{code="4xx"} by the total response rate, multiplying by 100, and triggers the alert when this percentage exceeds 5 % for the backend identified by the fqdn and backend labels.

Get Alert
Download
Copy to Clipboard