feat(monitoring): add nginx, postgres, valkey prometheus exporters

- nginx: nginx-prometheus-exporter gated by nginx_exporter_enabled,
  deploys loopback-only stub_status (8090), exporter on 9113
- postgres: postgres_exporter gated by postgres_exporter_enabled,
  creates postgres_exporter role with pg_monitor, exporter on 9187
- valkey: redis_exporter gated by valkey_exporter_enabled, adds
  read-only ACL user to users.acl, exporter on 9121

Each exporter follows the nut pattern (tasks/exporter.yml included from
main.yml, OS vars, 0600 secret env files, password asserts).
This commit is contained in:
Clément Désiles
2026-09-06 09:37:36 +02:00
parent 6f1f7f88f0
commit aa78e238aa
26 changed files with 304 additions and 0 deletions
+10
View File
@@ -49,3 +49,13 @@ postgres_log_truncate_on_rotation: "off" # Overwrite old log files with same nam
postgres_logrotate_rotate: 14 # Keep 14 days of logs
postgres_logrotate_frequency: daily # daily|weekly|monthly
postgres_logrotate_compress: true # Compress rotated logs
# Prometheus exporter (optional, via postgres_exporter)
# Creates its own minimal monitoring role (pg_monitor, no superuser).
postgres_exporter_enabled: false
postgres_exporter_listen_address: "127.0.0.1:9187"
postgres_exporter_user: postgres_exporter
# postgres_exporter_password: "" # Intentionally undefined - required when enabled
postgres_exporter_pg_host: "127.0.0.1"
postgres_exporter_pg_port: "{{ postgres_port }}"
postgres_exporter_pg_dbname: postgres