Frequently Asked Questions

What does pgwatch do in short?

It’s a metrics collector and visualization solution for PostgreSQL databases.

Is pgwatch 100% Open Source and free to use?

Exactly so! The software falls under the BSD 3-Clause Revised License so use it however you like – privately, commercially, make modifications.

How do I install pgwatch?

There are two ways – the simplest way is to use the public Docker image, which literally takes a minute to get metrics gathering going. The other option is to do a custom setup, by compiling the metrics collector written in Go and setting up or re-using the required external components – Grafana and InfluxDB.

What are the main benefits of using pgwatch?

Simplicity and the fact that user is in control and can change almost everything without
programming. The filosophy behind the tool could alos be expressed as – getting the 80% benefit on monitoring with 20% of effort.

How do I add a database to monitoring?

First of all, you need to decide if you wan’t to run a central PostgreSQL configuration database storing connection strings of monitored databases (this is how it works when using the Docker image) or you want to work with configuration files, in so called “file based” mode. In first case you can utilize the Web UI to insert the connection string to the to-be-monitored database with a couple of clicks (or via SQL directly), in the second case you need to change a configuration YAML file on the monitoring server(s), where pgwatch is running. In both cases changes will become effective automatically.

How do I add more metrics to monitoring?

Adding metrics is quite easy as metrics are gathered via normal SQL queries, usually involving PostgreSQL internal statistics collector views. In the default setup just go to Web UI “metrics” tab and and insert a new metric by modifying the template query. Then this metric’s name must also be added to some monitored databases config or to a preset config (collection of metrics).