Postgresql not enough connections critical
PostgreSQL instance should have more connections (> 5)
>>>
sum by (datname) (
{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.
Get Alert✕
Download
Copy to Clipboard