IntégrationsBases de données et messagerie
Surveiller PostgreSQL database avec DumbMonit
Logs in, runs a query and reads the server's health: catches a database that is up but no longer answering, and one that is running out of connections, lagging or bloating.
DocumentationSite officiel : PostgreSQL
Les descriptions des produits sont en anglais, comme dans le produit. Les libellés de la page suivent votre langue.
Ce que DumbMonit surveille
Usage typique. Database: connection and a query you choose
Exemples
- The database behind Nextcloud or Immich
- A Home Assistant recorder
- An application database
- A TimescaleDB instance
Comment il se connecte
Ce qu'il faut
- Username / passwordA read-only account created for monitoring, never an application one.
Port par défaut: 5432
Étapes de mise en place: Monitor a PostgreSQL database
In psql, create a role that may only log in.
CREATE ROLE dumbmonit LOGIN PASSWORD 'a-long-password';Allow it to connect from the DumbMonit host with this line in pg_hba.conf (adjust the address), then reload PostgreSQL.
host all dumbmonit 10.0.0.5/32 scram-sha-256In DumbMonit, enter the server, for example db.home.lan:5433 (port 5432 by default), then the role's user and password.
Optional: replace the default query SELECT 1 with one that returns a single number, to chart it.
Optional, for the complete server health metrics (sessions of every user, locks, replication, vacuum): let the role read the statistics views.
GRANT pg_monitor TO dumbmonit;
À savoir. The check opens a real connection on every poll: on an instance close to its connection limit, give it a longer interval.