Description
pgmetrics is an open-source command-line tool that collects and reports information and statistics from a running PostgreSQL server. It has no dependencies and ships as a single binary. It collects more than 350 metrics and prints them as easy-to-read text, or exports them as JSON and CSV for scripts and automation. Its reports cover WAL archiving, background writer and backend activity, vacuum progress, replication and replication slots, tablespace and database sizes, transaction ID wraparound age, cache hit ratio, bloat, deadlocks and blocked queries. Table and index sections show vacuum and analyze history, scan efficiency and size. It can also pull query plans, autovacuum and deadlock events from log files, including logs from AWS RDS. Hosted and proxied setups are supported, including AWS RDS, Aurora, Azure, Citus, PgBouncer, Pgpool, Google Cloud SQL and Odyssey. Its command-line flags and environment variables match psql, and it needs no PostgreSQL extension.…
Highlights
- Collects 350+ PostgreSQL metrics
- Text, JSON and CSV output
- Works with RDS, Aurora, Azure, Citus and PgBouncer
- Reads query plans and autovacuum events from logs
- Single static binary, no extension needed
Ratings & Reviews
No ratings yet
Be the first to rate Pgmetrics.
People also visit
Collector
pganalyze statistics collector for gathering PostgreSQL metrics and log data
PG Activity
pg_activity is a top like application for PostgreSQL server activity monitoring

clickhouse-managed-postgres-rca
MUST USE when investigating performance issues on a ClickHouse-managed Postgres
Pgmetrics FAQ
What is pgmetrics?
A command-line tool that collects metrics from a running PostgreSQL server for troubleshooting, scripting and automation.
Do I need to install a PostgreSQL extension?
No. pgmetrics needs no PostgreSQL extension, and it uses the same command-line flags and environment variables as psql.
Which hosted databases does it support?
AWS RDS PostgreSQL, AWS RDS Aurora, Microsoft Azure, Citus, PgBouncer, Pgpool, Google Cloud SQL and Odyssey.
What output formats are there?
Readable text for people, and JSON and CSV for scripts.
Is it open source?
Yes. The project is developed on GitHub, and the latest release listed on the site is v1.19.0, released on 18 January 2026.
What are the best Pgmetrics alternatives?
Popular alternatives to Pgmetrics include Collector, PG Exporter and PG Activity. See all Pgmetrics alternatives







