Postgresql too many connections warning
>>>
sum by (instance, job, server) (
pg_stat_activity_count
) > min by (instance, job, server) (
pg_settings_max_connections
* 0.8)
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.
Exporters Used
Related Alerts
PostgreSQLCacheHitRatio
PostgreSQLDown
PostgreSQLHighConnections
PostgreSQLMaxConnectionsReached
PostgreSQLQPS
PostgreSQLSlowQueries
Postgresql SSL compression active
Postgresql bloat index high (> 80%)
Postgresql bloat table high (> 80%)
Postgresql commit rate low
Postgresql configuration changed
Postgresql dead locks
Postgresql down
Postgresql exporter error
Postgresql high rate deadlock
Postgresql high rate statement timeout
Postgresql high rollback rate
Postgresql invalid index
Postgresql low XID consumption
Postgresql not enough connections
Postgresql replication lag
Postgresql restarted
Postgresql table not auto analyzed
Postgresql table not auto vacuumed
Postgresql too many dead tuples
Postgresql too many locks acquired
Postgresql unused replication slot