Pgwatch2 – next generation PostgreSQL monitoring tool

Although there are many PostgreSQL monitoring solutions out there, most of them are sadly too complex to set up and too inflexible to extend the functionality yourself – pgwatch2 tries to change that by providing previously unavailable flexibility by concentrating on metrics gathering only and leaving presentation side to the best dashboarding tool available.

Pgwatch2 works as a remote metrics gathering daemon, periodically connecting to the database as a normal user would, and reading out metrics provided by the Postgres statistics subsystem. This has the advantage that you don’t have to have any special user rights and don’t have to install any extensions on the database server itself, making use in restricted environments (e.g. AWS RDS) possible.

This slideshow requires JavaScript.

Main features of pgwatch2

  • 1-minute installation with Docker (custom installations still possible)
  • Superb overview of all database activities from a single page
  • Easy extensibility by defining metrics in pure SQL
  • Intuitive metrics presentation using the Grafana dashboarding engine – users can create their own graphs (in addition to predefined ones) with just a couple of clicks
  • Optional alerting (Email, Slack, PagerDuty) provided by Grafana
  • Open Source software – free to extend
  • PostgreSQL versions 9.0+ supported out of the box

More details:

  • Built in web-based management interface for managing monitored databases and metrics
  • Metric storage in high performance Time Series Database called InfluxDB
  • Optional basic security by user authentication
  • Optional “metrics fetching helper” stored procedures for reading out CPU load and pg_stat_statement info are provided
  • Logs for individual components exposed over the web-based UI for easier troubleshooting

Screenshot of the predefined “DB overview” dashboards


Find more detailed information and screenshots in our BLOG.

Quickstart


# 1. start the docker image

docker run -d -p 3000:3000 -p 8080:8080 --name pw2 cybertec/pgwatch2

# 2. add your database to monitoring via the management interface on port 8080

# 3. wait some minutes to let the daemon fetch some data and then open Grafana on port 3000

# 4. enjoy!

 

Download the source code or contribute to the project via the Github project page HERE.