bird: install prometheus-bird-exporter
This commit is contained in:
parent
64dcb4b282
commit
1c47ccc4a8
4 changed files with 30 additions and 1 deletions
|
@ -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
|
||||||
...
|
...
|
||||||
|
|
|
@ -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
|
||||||
|
...
|
||||||
...
|
...
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
...
|
...
|
||||||
|
|
3
roles/bird/templates/prometheus-bird-exporter.j2
Normal file
3
roles/bird/templates/prometheus-bird-exporter.j2
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
{{ ansible_managed | comment }}
|
||||||
|
|
||||||
|
ARGS="-format.new -bird.v2 -web.listen-address {{ bird__prometheus_listen_address }}"
|
Loading…
Reference in a new issue