Monitoring PostgreSQL with Bleemeo

Florian Gabon Published on 12 May 2021 by Florian Gabon

Figure 1: PostgreSQL logo

In this blog article, you will discover how to setup a complete monitoring of your PostgreSQL server with Bleemeo. Agent setup and dashboards creation will be covered.

What is PostgreSQL?

The PostgreSQL also known as Postgres, is one of the most known and widely used Open Source relational database server. It was officially released in 1996. PostgreSQL was created at the University of California (Berkeley) by the professor Michael Stonebraker and nowadays organizations such as Apple, Red hat and Cisco use it.

Configuring PostgreSQL for Bleemeo

After installing PostgreSQL with your favorite distribution package and installing Bleemeo monitoring agent, bleemeo will auto-discover PostgreSQL presence and start doing ports checks for service availability.

If you use a Docker container the POSTGRES_USER and POSTGRES_PASSWORD will be used to access your database. Otherwise, you need to manually specify how to access your database to the monitoring agent:

Create a /etc/glouton/conf.d/99-postgresql.conf file with:

service: [...] # For a PostgreSQL running outside any container - id: "postgresql" username: "USERNAME" password: "PASSWORD" address: "" port: 5432

Restart the monitoring agent systemctl restart glouton. Bleemeo monitoring agent should start collecting data at this point.

Figure 2: PostgreSQL schema

All configuration options are listed in our our documentation.

Bleemeo default service dashboard

Once the Bleemeo agent has been able to access PostgreSQL, a new service default dashboard appears in "Services" tab of the server: Figure 3: Service PostgreSQL dashboard screenshot

Customizing your dashboard

You can also configure a custom dashboard with metrics that are not graphed in the default service dashboard to match your expectations. You could also add to this dashboard business metrics like the number of checkout or signup to correlate information. In this example, the following metrics will be graphed:

  • Number of commits per second
  • Number of rows returned per second

All metrics available for PostgreSQL are listed in our documentation.

Figure 4: PostgreSQL dashboard screenshot

Those dashboards allows you to have a better global view of your infrastructure and what is happening on your server(s). You can also add other metrics, if you run your server on a docker for example you can add:

  • Status of Postgres docker
  • CPU used by Postgres container
  • Status of an Apache server

Figure 5: PostgreSQL custom dashboard screenshot

This dashboard can be customized as needed.

Monitoring PostgreSQL web server and creating custom dashboards only take a couple of minutes with Bleemeo.

If you don't have a Bleemeo account yet, start monitoring your PostgreSQL today in 30s.

Start Monitoring your servers, containers, and applications in 30 seconds without credit card.Start your Free Trial