blob: e93030246ec5c6f57812fb19e6ccb069cd963cd2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
{% set vrf_command = 'ip vrf exec ' ~ vrf ~ ' runuser -u node_exporter -- ' if vrf is vyos_defined else '' %}
[Unit]
Description=Blackbox Exporter
Documentation=https://github.com/prometheus/blackbox_exporter
After=network.target
[Service]
{% if vrf is not vyos_defined %}
User=node_exporter
{% endif %}
ExecStart={{ vrf_command }}/usr/sbin/blackbox_exporter \
{% if listen_address is vyos_defined %}
{% for address in listen_address %}
--web.listen-address={{ address }}:{{ port }} \
{% endfor %}
{% else %}
--web.listen-address=:{{ port }} \
{% endif %}
--config.file=/run/blackbox_exporter/config.yml
[Install]
WantedBy=multi-user.target
|