PostgreSQL checks
The postgresql module has 6 checks. PostgreSQL (Flexible Server or self-hosted) via a read-only monitoring role with pg_monitor.
This page is generated from the product's check catalog when the documentation is built, so the rules, intervals and default severities always match the version you are reading. Thresholds are defaults; entities and resources can override them.
| Check | Every | Default severity | Rule |
|---|---|---|---|
postgresql.connectionsConnections used vs max | 60s | warning | warning > 80 percent / critical > 90 percent |
postgresql.replication_lagReplication lag | 60s | warning | warning > 60 seconds / critical > 300 seconds |
postgresql.vacuum_wraparoundTransaction ID age (wraparound risk) | 3600s | warning | warning > 1000000000 count / critical > 1500000000 count |
postgresql.bloat_estimateTable bloat (estimated, top tables) | 86400s | info | warning > 20 percent / critical > 40 percent |
postgresql.slow_queriesSlowest statements (pg_stat_statements) | 300s | info | ±2σ over 14d (learning only) |
postgresql.security_postureSecurity posture (superusers, SSL, pg_hba) | 3600s | warning | ssl = on, risky_hba_rules = 0 |
Checks
postgresql.connections
Connections used vs max
- Measures
used_percent(percent) · every60s·pgsql- Rule
warning > 80 percent / critical > 90 percent· Default severity: warning- Action
- —
- Baseline
- Azure recommended rule for Flexible Server: connections > 80% of max.
postgresql.replication_lag
Replication lag
- Measures
lag_seconds(seconds) · every60s·pgsql- Rule
warning > 60 seconds / critical > 300 seconds· Default severity: warning- Action
- —
postgresql.vacuum_wraparound
Transaction ID age (wraparound risk)
- Measures
xid_age(count) · every3600s·pgsql- Rule
warning > 1000000000 count / critical > 1500000000 count· Default severity: warning- Action
- —
- Baseline
- Forced vacuum at ~2.1 billion; warn at 1 billion. · source
postgresql.bloat_estimate
Table bloat (estimated, top tables)
- Measures
dead_percent(percent) · every86400s·pgsql- Rule
warning > 20 percent / critical > 40 percent· Default severity: info- Action
- —
postgresql.slow_queries
Slowest statements (pg_stat_statements)
- Measures
mean_ms(milliseconds) · every300s·pgsql- Rule
±2σ over 14d (learning only)· Default severity: info- Action
- —
- Baseline
- Requires the pg_stat_statements extension.
postgresql.security_posture
Security posture (superusers, SSL, pg_hba)
- Measures
security_posture· every3600s·pgsql- Rule
ssl = on, risky_hba_rules = 0· Default severity: warning- Action
- —
- Baseline
- superusers > 2 raises a warning; pg_hba_file_rules needs PostgreSQL 10+ and superuser or pg_read_server_files. · source
Related content
- PostgreSQL: prerequisites and how to add resources
- Thresholds and baselines: how a default threshold is overridden