pgmetrics is an open-source project released under the Apache 2.0 license. The development happens on GitHub at rapidloop/pgmetrics. It is developed and maintained by RapidLoop.

pgmetrics is written entirely in Go. It requires Go v1.11 or later to build, and uses Go modules introduced in Go 1.11. Once you have a working Go environment, you can do:

go get -u

to fetch and build the latest pgmetrics source. The binary will be present at $GOPATH/bin/pgmetrics.

To work with the source, you can clone the git repo, make changes and build the binary with:

git clone
cd pgmetrics
go build ./cmd/pgmetrics
./pgmetrics --help

To contribute patches, first fork the project in GitHub, make your changes and send us a pull request. If you’d like to discuss your changes first, please create an issue in GitHub. We welcome patches that:

  • collect more information, metrics, statistics
  • add support for other versions/variants of PostgreSQL
  • documentation snippets that show how to set up/use pgmetrics
  • tools/example code in any language that make use of pgmetrics’ JSON or CSV output

If you’ve something cool to show or tell the other users of pgmetrics, please drop us a line at, and we’ll work with you to get it into this website.