Files
Clément Désiles 65fdb4face fix(monitoring): exporter auth and reload fixes
- postgres: use lib/pq conninfo DATA_SOURCE_NAME; the postgresql:// URL
  form broke on special chars in the password (net/url: invalid userinfo)
- nginx: flush handlers after deploying stub_status so nginx reloads
  before the exporter starts scraping
- valkey: drop invalid +arcount command from the exporter ACL set
  (Valkey aborted startup parsing the ACL file)
2026-09-06 23:47:13 +02:00

38 lines
1.0 KiB
YAML

---
# Prometheus nginx exporter (optional, gated by nginx_exporter_enabled).
# Installs nginx-prometheus-exporter and exposes a loopback-only stub_status
# endpoint that the exporter scrapes.
- name: Install nginx-prometheus-exporter
ansible.builtin.package:
name: "{{ nginx_exporter_package }}"
state: present
- name: Deploy nginx stub_status endpoint
ansible.builtin.template:
src: stub-status.conf.j2
dest: "{{ nginx_conf_dir }}/99-stub-status.conf"
owner: root
group: root
mode: "0644"
notify: Reload nginx
- name: Flush handlers to reload nginx with stub_status
ansible.builtin.meta: flush_handlers
- name: Deploy exporter environment file
ansible.builtin.template:
src: exporter-env.conf.j2
dest: "{{ nginx_exporter_args_file }}"
owner: root
group: root
mode: "0644"
notify: Restart nginx exporter
- name: Enable and start nginx exporter
ansible.builtin.systemd:
name: "{{ nginx_exporter_service }}"
enabled: true
state: started
daemon_reload: true