Development

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.9 or later to build. Once you have a working Go environment, you can do:

go get -u github.com/rapidloop/pgmetrics/...

to fetch and build the latest pgmetrics source.

You’ll find the sources at $GOPATH/src/github.com/rapidloop/pgmetrics and the pgmetrics binary as $GOPATH/bin/pgmetrics. If you make changes to the code, you can recompile the binary with:

cd $GOPATH/src/github.com/rapidloop/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 output

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