From 749cb57b052d3be8422246c09f0d1d3e5a017499 Mon Sep 17 00:00:00 2001 From: Robert Drake Date: Mon, 6 Oct 2025 13:09:03 -0400 Subject: [PATCH] Fix the rules for postgres_exporter. Change to the prometheus version. --- Monitoring.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Monitoring.md b/Monitoring.md index 3625c4f..00bde53 100644 --- a/Monitoring.md +++ b/Monitoring.md @@ -29,15 +29,12 @@ services: # postgres postgres-exporter: - image: wrouesnel/postgres_exporter:v0.8.0 + image: quay.io/prometheuscommunity/postgres-exporter:latest depends_on: - postgres - env_file: env/postgres.env + env_file: env/pg_exporter.env environment: DATA_SOURCE_URI: postgres?sslmode=disable - DATA_SOURCE_USER: $${POSTGRES_USER} - DATA_SOURCE_PASS: $${POSTGRES_PASSWORD} - PG_EXPORTER_AUTO_DISCOVER_DATABASES: 'true' # redis redis-worker-exporter: @@ -120,8 +117,11 @@ scrape_configs: - targets: ['grafana:3000'] ``` -Finally, create env/grafana.env. You will need to know the ADMIN PASSWORD to login to grafana, but it will be changed on first login. +Finally, create env/grafana.env and env/pg_exporter.env. You will need to know the GF_SECURITY_ADMIN_PASSWORD to login to grafana, but it will be changed on first login. + source env/postgres.env + echo "DATA_SOURCE_USER=$POSTGRES_USER" > env/pg_exporter.env + echo "DATA_SOURCE_PASS=$POSTGRES_PASSWORD" >> env/pg_exporter.env echo "GF_SECURITY_SECRET_KEY=$(openssl rand -base64 32)" > env/grafana.env echo "GF_SECURITY_ADMIN_PASSWORD=$(openssl rand -hex 5)" | tee -a env/grafana.env