pgmetrics

Easily collect and report PostgreSQL metrics for scripting, automation and troubleshooting.

pgmetrics is an open-source, zero-dependency, single-binary tool that can collect a lot of information and statistics from a running PostgreSQL server and display it in easy-to-read text format or export it as JSON and CSV for scripting.

Subsystem Info

Collects information about WAL archiving, BG writer, backends (waiting, idling, transaction too long), vacuum progress, replication (primary, standby, publications, subscriptions), replication slots (physical, logical)

Database Info

Gathers stats about tablespaces (location, disk and inode usage), database sizes, transaction ID wraparound age, commit ratios, bloat, deadlocks, conflicts, cache hit ratio, installed extensions, disabled triggers, pg_stat_statements, blocked queries

Table & Index Info

Collects stats about last vacuum and analyze runs, changes since last vacuum, HOT update ratio, ins/upd/del ratios, seq and idx scan efficiency, table size and bloat, index hit ratio, inheritance, partition; index scans, size, bloat, definition

Log Files

Extracts query execution plans, autovacuum and deadlock information from PostgreSQL log files.

AWS RDS & Citus Support

Fetches RDS Metrics and Enhanced Monitoring metrics from AWS RDS databases, including AWS RDS Aurora, using CloudWatch APIs. New! Fetches metrics and information from Citus and Microsoft Azure Hyperscale Citus.

Easy To Use

Same command-line flags and env. vars. as psql. No need to install any PostgreSQL extension. Zero-dependency, statically linked binaries for many platforms.


Join the mailing list for announcements and discussion:
Download the latest release:
v1.10.2, released 12-Oct-2020
Read the documentation:

pgDash: pgmetrics-based Monitoring, Diagnostics & Alerting

Send your pgmetrics reports to pgDash for real-time monitoring, dashboards, diagnostics, query performance monitoring, alerts and more. pgDash is a commercial offering from RapidLoop, with both SaaS and self-hosted/on-premise deployment options.

Find out more and sign up for a 14-day free trial at pgdash.io.

© RapidLoop, Inc. 2020 · All Rights Reserved.