Postgresql not enough connections critical
>>>
sum by (datname) (
pg_stat_activity_count
{datname!~"template.*|postgres"}) < 5
The rule aggregates the pg_stat_activity_count metric for all non‑template databases (excluding template.* and postgres) and checks if the total number of active connections is less than 5. The alert fires whenever the summed connections across those databases drop below 5, indicating the PostgreSQL instance may not have enough client connections.
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 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