diff --git a/howto/postgresql.md b/howto/postgresql.md index 616bd252ed0a7d1ff7a4a2d42d0bdf2afd44dea7..11c817303706d98894488f3fd85ceb8650b719de 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/).