PostgreSQLHighConnections
>>>
sum
(
pg_stat_activity_count
) by (instance) > (
sum
(
pg_settings_max_connections
) by (instance) -
sum
(
pg_settings_superuser_reserved_connections
) by (instance)) * 0.8
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
PostgreSQLCacheHitRatio
PostgreSQLDown
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 connections
Postgresql too many dead tuples
Postgresql too many locks acquired
Postgresql unused replication slot