PostgreSQLHighConnections

Description {{ $labels.instance }} is exceeding 80% of the currently configured maximum Postgres connection limit (current value: {{ $value }}s). Please check utilization graphs and confirm if this is normal service growth, abuse or an otherwise temporary condition or if new resources need to be provisioned (or the limits increased, which is mostly likely).
Query for 10m
>>>
	
				
					
					
						sum
					
				
			
				
					(
				
			
				
					
				
			
				
					) by (instance) > (
				
			
				
					
					
						sum
					
				
			
				
					(
				
			
				
					
				
			
				
					) by (instance) - 
				
			
				
					
					
						sum
					
				
			
				
					(
				
			
				
					
				
			
				
					) by (instance)) * 0.8
				
			
    
Query Explanation

The rule sums the current connections per PostgreSQL instance (pg_stat_activity_count) and checks if this total exceeds 80 % of the instance’s usable maximum connections (the configured max_connections minus the superuser_reserved_connections). The alert triggers when the active connections on an instance are greater than that 80 % threshold.

Exporters Used

Related Alerts

Get Alert
Download
Copy to Clipboard