Postgresql too many connections
warning

Description PostgreSQL instance has too many connections (> 80%).
Query for 2m
>>>
	
				
					sum by (instance, job, server) (
				
			
				
					
				
			
				
					) > min by (instance, job, server) (
				
			
				
					
				
			
				
					 * 0.8)
				
			
    
Query Explanation

The rule sums the current number of PostgreSQL connections (pg_stat_activity_count) per instance, job, and server and checks if that total exceeds 80 % of the configured max_connections (pg_settings_max_connections * 0.8). The alert fires when the observed connections are greater than this 80 % threshold on any instance.

Get Alert
Download
Copy to Clipboard