pgmetrics is an open-source, Apache-2.0 licensed Go command-line tool that collects and displays information and statistics from a running PostgreSQL server, aimed at database administrators, site reliability engineers, and platform teams who troubleshoot, monitor, or automate PostgreSQL.
What it is
pgmetrics lives in the PostgreSQL operations ecosystem. It is a standalone metric-gathering tool maintained by RapidLoop, with source hosted on GitHub under the Apache-2.0 licence and documentation at pgmetrics.io. The repository carries the topics database, postgres, postgresql, metrics, metrics-gathering, monitoring, go, and golang, and the project is implemented in Go. It works against a running PostgreSQL server, reading information and statistics out of it rather than requiring anything of the applications above it.
The concrete problem it solves is getting a usable picture of a live PostgreSQL server's state and statistics without assembling that picture by hand each time. The README frames the purpose as aiding troubleshooting, monitoring, and automation, which means the same collection step serves three distinct consumers: an operator reading output during an incident, a monitoring pipeline that ingests statistics on a schedule, and an automation workflow that reacts to them. The supplied facts do not identify a specific incumbent product that pgmetrics replaces; it occupies the metric-gathering slot in the PostgreSQL toolchain. With 1,111 stars, 80 forks, and 12 open issues, it has an established user base and a low outstanding-issue count.
Key capabilities
- Collects information and statistics from a running PostgreSQL server under the single
pgmetrics command.
- Displays that information directly, so it can be read during hands-on troubleshooting.
- Produces the same collection output for monitoring use, not only for one-off inspection.
- Serves automation workflows, per the README's stated purpose of aiding troubleshooting, monitoring, and automation.
- Implemented in Go, matching the repository's
go and golang topics.
- Released under the Apache-2.0 licence.
- Maintained by RapidLoop, with further information published at https://pgmetrics.io.
Who uses it and how
- Database administrators troubleshooting a running PostgreSQL server who need its current information and statistics.
- Monitoring engineers who collect PostgreSQL statistics as part of an observability pipeline.
- Automation authors who need statistics from a live server as input to scheduled or scripted workflows.
- Operations teams that administer PostgreSQL servers and want collection handled from outside the server process.
- Teams already working in the Go ecosystem, given the project's
go and golang topics.
Getting started
The README points to https://pgmetrics.io for more information. The supplied facts name no package name, Docker image, or compose file, so installation and run instructions must be taken from that site.
How it compares
The supplied facts do not list any paid products that pgmetrics replaces, and they do not name comparable tools. On the evidence provided, it stands alone in this registry as a PostgreSQL metric-gathering tool.
When to use it — and when not to
A user must be able to run the tool from a machine that can reach a running PostgreSQL server; the supplied facts state no other dependency such as a database, storage layer, or SMTP service. Anyone who needs a hosted service, retained metric history, or dashboards is outside what these facts describe, since pgmetrics collects and displays rather than storing. The honest weak points are that the in-repository README is sparse and defers to an external site for detail, and that 12 issues remain open, although the last push of 2026-09-09 indicates the project is still maintained.