checkfleet

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; otherwise OK with the role (primary/replica, from pg_is_in_recovery()).
  • Transaction wraparound: max(age(datfrozenxid)) past wraparound_warn_age/wraparound_crit_ageWARN/BAD (wraparound looms near ~2.1e9).
  • Connection saturation: WARN when active connections reach conn_warn_pct% of max_connections.
  • Inactive replication slots: an inactive slot is WARN; if it retains WAL past slot_warn_bytes/slot_crit_bytesWARN/BAD (disk-fill risk).
  • Replica lag (primary only, from pg_stat_replication): WARN/BAD past lag_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.