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
- type: "postgresql"
username: "USERNAME"
password: "PASSWORD"
address: "127.0.0.1"
port: 5432
Restart the monitoring agent: systemctl restart glouton
. It should start collecting data at this point.
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:
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 checkouts 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.
Those dashboards allow 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 the Postgres container
- Memory used by the Postgres container
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.