-
Notifications
You must be signed in to change notification settings - Fork 340
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
99 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{% 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 %} | ||
{% if config_file is vyos_defined %} | ||
--config.file={{ config_file }} | ||
{% else %} | ||
--config.file=/etc/blackbox_exporter/config.yml | ||
{% endif %} | ||
[Install] | ||
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters