DumbMonit

IntegracionesBases de datos y mensajería

Monitorizar PostgreSQL database con 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.

DocumentaciónSitio web oficial: PostgreSQL

Las descripciones están en inglés, como en el producto. Las etiquetas de la página siguen su idioma.

Qué vigila DumbMonit

Uso habitual. Database: connection and a query you choose

Ejemplos

  • The database behind Nextcloud or Immich
  • A Home Assistant recorder
  • An application database
  • A TimescaleDB instance

Cómo se conecta

Qué necesita

  • Username / passwordA read-only account created for monitoring, never an application one.

Puerto por defecto: 5432

Pasos de configuración: Monitor a PostgreSQL database
  1. In psql, create a role that may only log in.

    CREATE ROLE dumbmonit LOGIN PASSWORD 'a-long-password';
  2. 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-256
  3. In DumbMonit, enter the server, for example db.home.lan:5433 (port 5432 by default), then the role's user and password.

  4. Optional: replace the default query SELECT 1 with one that returns a single number, to chart it.

  5. 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;

Ojo. The check opens a real connection on every poll: on an instance close to its connection limit, give it a longer interval.