From 4c574f0fd543d0576cdde61806fc22ff9f08d273 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Beaupr=C3=A9?= <anarcat@debian.org> Date: Tue, 24 Sep 2024 10:49:05 -0400 Subject: [PATCH] document that the postgres exporter is configured automatically --- howto/postgresql.md | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/howto/postgresql.md b/howto/postgresql.md index 616bd252..11c81730 100644 --- a/howto/postgresql.md +++ b/howto/postgresql.md @@ -1663,28 +1663,17 @@ PostgreSQL keeps log files in `/var/log/postgresql/`, one per form of SQL queries. The log rotation policy is the one set by the Debian package and keeps logs for 10 weeks. -A [Prometheus](howto/prometheus) exporter is installed on the [GitLab](howto/gitlab) server by -the GitLab omnibus package, but metrics are not collected on other -Prometheus servers. The [Grafana](howto/grafana) server has a handful of -dashboards in various working states: +[Prometheus](howto/prometheus) monitors the PosgreSQL servers through the [PostgreSQL +exporter]() deployed by Puppet through the +`profile::prometheus::postgres_exporter` class. + +The [Grafana](howto/grafana) server has a handful of dashboards in various working +states: * [Postgres Overview](https://grafana.torproject.org/d/wGgaPlciz/postgres-overview) - basic dashboard with minimal metrics * [PostgreSQL Overview (Percona)](https://grafana.torproject.org/d/IvhES05ik/postgresql-overview-percona) - mostly working * [GitLab Omnibus - PostgreSQL](https://grafana.torproject.org/d/c_LJgXfmk/gitlab-omnibus-postgresql) - broken -We do have a Puppet class (`profile::prometheus::postgres_exporter` -which can monitor PostgreSQL servers, but it is not deployed on all -hosts. This is because there is still a manual step in the -configuration of the exporter. See "installation" above. - -It would also be preferable if that procedure was automated in Puppet, -but that requires haggling with the `postgresql` module which we do -not actually use, currently. It does not directly conflict with our -`postgres` module, but it does rewrite the `pg_hba.conf` and -`postges.conf`. If we do eventually fix this oddity, know that we -considered using `postgresql::server::grant`, but it might be better -to call `postgresql_psql` directly. - Note that there is a program called [pgstatsmon](https://github.com/joyent/pgstatsmon) which can provide very detailed information about the state of a PostgreSQL database, see [this blog post for details](https://www.davepacheco.net/blog/2019/visualizing-postgresql-vacuum-progress/). -- GitLab