bird: install prometheus-bird-exporter

This commit is contained in:
jeltz 2022-12-21 19:48:22 +01:00
parent 64dcb4b282
commit 1c47ccc4a8
Signed by: jeltz
GPG key ID: 800882B66C0C3326
4 changed files with 30 additions and 1 deletions

View file

@ -11,4 +11,5 @@ bird__radv_dns_servers: []
bird__radv_max_interval: 5 bird__radv_max_interval: 5
bird__static_unreachable: [] bird__static_unreachable: []
bird__bgp_sessions: [] bird__bgp_sessions: []
bird__prometheus_listen_address: 0.0.0.0:9324
... ...

View file

@ -3,4 +3,10 @@
systemd: systemd:
name: bird.service name: bird.service
state: reloaded state: reloaded
- name: Reload prometheus-bird-exporter
systemd:
name: prometheus-bird-exporter.service
state: reloaded
...
... ...

View file

@ -1,7 +1,9 @@
--- ---
- name: Install bird - name: Install bird
apt: apt:
name: bird2 name:
- bird2
- prometheus-bird-exporter
- name: Configure bird - name: Configure bird
template: template:
@ -13,9 +15,26 @@
notify: notify:
- Reload bird - Reload bird
- name: Configure prometheus-bird-exporter
template:
src: prometheus-bird-exporter.j2
dest: /etc/default/prometheus-bird-exporter
owner: root
group: root
mode: u=rw,g=r,o=
notify:
- Restart prometheus-bird-exporter
- name: Enable and start bird - name: Enable and start bird
systemd: systemd:
name: bird.service name: bird.service
state: started state: started
enabled: true enabled: true
- name: Enable and start prometheus-bird-exporter
systemd:
name: prometheus-bird-exporter.service
state: started
enabled: true
... ...

View file

@ -0,0 +1,3 @@
{{ ansible_managed | comment }}
ARGS="-format.new -bird.v2 -web.listen-address {{ bird__prometheus_listen_address }}"