feat(unbound): add prometheus exporter, dashboard, fix socket buffer sysctl

This commit is contained in:
Clément Désiles
2026-09-06 23:44:05 +02:00
parent 304a3fae12
commit ed5d0c68f1
11 changed files with 290 additions and 3 deletions
+35
View File
@@ -0,0 +1,35 @@
---
# Prometheus unbound exporter (optional, gated by unbound_exporter_enabled).
# Scrapes unbound-control stats_noreset over the local control interface.
- name: Assert exporter is supported (Arch Linux only)
ansible.builtin.assert:
that: ansible_facts['os_family'] == 'Archlinux'
fail_msg: |
The unbound exporter (prometheus-unbound-exporter) is only packaged for
Arch Linux. It is not available in Debian/Ubuntu repositories.
success_msg: "Unbound exporter supported"
- name: Load OS-specific exporter variables
ansible.builtin.include_vars: archlinux.yml
- name: Install prometheus-unbound-exporter
ansible.builtin.package:
name: "{{ unbound_exporter_package }}"
state: present
- name: Deploy exporter environment file
ansible.builtin.template:
src: exporter-env.conf.j2
dest: "{{ unbound_exporter_args_file }}"
owner: root
group: root
mode: "0644"
notify: Restart unbound exporter
- name: Enable and start prometheus-unbound-exporter
ansible.builtin.systemd:
name: "{{ unbound_exporter_service }}"
enabled: true
state: started
daemon_reload: true