PostgreSQL check
postgres — PostgreSQL
Read-only SQL checks — transaction-ID wraparound risk, connection saturation, inactive replication slots, replica lag.
checkfleet check postgres --config checkfleet.yml
PostgreSQL health via read-only SQL (using the pgx driver — the module’s
own dependency). It never runs DDL or writes.
- Reachability: a failed connect or query is
ERROR; otherwiseOKwith the role (primary/replica, frompg_is_in_recovery()). - Transaction wraparound:
max(age(datfrozenxid))pastwraparound_warn_age/wraparound_crit_age→WARN/BAD(wraparound looms near ~2.1e9). - Connection saturation:
WARNwhen active connections reachconn_warn_pct% ofmax_connections. - Inactive replication slots: an inactive slot is
WARN; if it retains WAL pastslot_warn_bytes/slot_crit_bytes→WARN/BAD(disk-fill risk). - Replica lag (primary only, from
pg_stat_replication):WARN/BADpastlag_warn_bytes/lag_crit_bytes.
Findings are labelled name, name [wraparound], name [connections],
name [slot:<name>], name [repl:<client>]. The password is read from the
target’s password_env — never stored in the config.
See Configuration → checks.postgres.
See the full module reference for every check, or configuration for the config keys.