# rapidloop/pgmetrics

Collect and display information and stats from a running PostgreSQL server

Repository: https://github.com/rapidloop/pgmetrics
Canonical: https://ross.abutalabs.com/products/pgmetrics
Homepage: https://pgmetrics.io
Language: Go
License: Apache-2.0
License Family: permissive
Topics: postgresql, postgres, golang, go, monitoring, database, metrics, metrics-gathering
Last push: 2026-09-02T10:49:29+00:00

## Health v2 (maintenance only)
Score: 80/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 100, release rhythm 42, longevity 100
- inputs: {"age_days": 3110, "days_push": 0, "days_rel": 227, "gap_med": 111, "n_releases_24m": 4}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1108, forks 80 (observed 2026-09-03T02:15:17.286836+00:00)

## What it is
pgmetrics is a zero-dependency, single-binary Go CLI tool that collects 350+ metrics from a running PostgreSQL server and reports them in human-readable text, JSON, or CSV. It supports generic PostgreSQL as well as AWS RDS/Aurora, Azure, GCP SQL, Citus, PgBouncer, and Pgpool, and can parse PostgreSQL log files.

## Use cases
- collect postgresql server metrics for troubleshooting
- export postgres stats as  for scripting and automation
- check database bloat, vacuum status and cache hit ratios
- monitor replication lag and replication slots
- find blocked queries and long-running transactions
- extract slow queries and deadlocks from postgres log files
- gather metrics from aws rds or azure postgres without installing extensions

## When to choose
- you need a lightweight, no-install, single-binary postgres diagnostics tool
- you want machine-readable (JSON/CSV) postgres metrics for automation pipelines
- you troubleshoot replication, vacuum, locks, or wraparound issues on postgres or managed cloud postgres

## When to avoid
- you need continuous monitoring with dashboards and alerting rather than point-in-time collection
- you want a long-running metrics agent that ships to time-series storage
- you need non-PostgreSQL databases

## Facets
- artifact type: cli-tool
- maturity: active
- function: monitoring, database, cli, developer-tools
- domain: databases, monitoring, developer-tools
- platform: windows, cross-platform, cli
- tags: postgresql, metrics-collection, database-diagnostics, single-binary, -output, csv-output, aws-rds, azure, pgbouncer, devops, linux, macos

## Member repositories
- rapidloop/pgmetrics (main) score 80

## Provenance
- Observed fields: from GitHub, fetched 2026-09-03T02:15:17.286836+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:44:03.175454+00:00, confidence not recorded.
  - readme: https://github.com/rapidloop/pgmetrics (fetched 2026-09-03T02:15:17.286836+00:00, sha e0c56d185de9)
  - homepage: https://pgmetrics.io (fetched 2026-08-29T12:47:36.164271+00:00, sha c01e0337870e)
  - site_page: https://pgmetrics.io/docs (fetched 2026-08-29T12:47:36.166773+00:00, sha f56b7d3e173f)
  - site_page: https://pgmetrics.io/docs/index.html (fetched 2026-08-29T12:47:36.169694+00:00, sha a2b9b977e3e8)
- Data as of 2026-08-30T08:39:29.467469+00:00.
