View a quick screencast at https://asciinema.org/a/190659 to get an overview of the steps detailed below to get pgDash setup:
curl -O -L https://github.com/rapidloop/pgmetrics/releases/download/v1.5.1/pgmetrics_1.5.1_linux_amd64.tar.gztar xvf pgmetrics_1.5.1_linux_amd64.tar.gz
pgmetrics is the open-source collection agent for pgDash. This is available as a single, zero-dependency, statically-linked binary executable that you can copy to your
$PATH. You can download this from GitHub here, or see other install options here. Once downloaded, try invoking it and seeing a report for your database:
./pgmetrics_1.5.1_linux_amd64/pgmetrics --no-password bench
curl -O -L https://github.com/rapidloop/pgdash/releases/download/v1.3.2/pgdash_1.3.2_linux_amd64.tar.gztar xvf pgdash_1.3.2_linux_amd64.tar.gz
The command-line tool for uploading reports to the pgDash website is also available from GitHub here. This too is a single binary that can be placed anywhere.
./pgmetrics_1.5.1_linux_amd64/pgmetrics --no-password -f json bench | ./pgdash_1.3.2_linux_amd64/pgdash -a YOUR-API-KEY report myserver1
pgdash report command will upload the report in JSON format, piped to it from pgmetrics into https://app.pgdash.io/. “myserver1” is a friendly name to identify your database server.
You should now be able to see the report in pgDash after logging in.
You can repeat this command say, every 10 minutes or so, and see the timeseries graphs populating under “myserver1”.
Learn more about automating this operation.