diff options
author | Robert Göhler <github@ghlr.de> | 2024-10-17 08:35:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-17 09:35:47 +0300 |
commit | 3f933f1642debfca5c9e3873790a5742ef242c75 (patch) | |
tree | 0fd5fe02833a374772233a94068f711fea799445 /data/templates | |
parent | e5d2ac54150922640c08bacab124e96c7bbd1f7f (diff) | |
download | vyos-1x-3f933f1642debfca5c9e3873790a5742ef242c75.tar.gz vyos-1x-3f933f1642debfca5c9e3873790a5742ef242c75.zip |
T973: add basic frr_exporter implementation (#4150)
Diffstat (limited to 'data/templates')
-rw-r--r-- | data/templates/frr_exporter/frr_exporter.service.j2 | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/data/templates/frr_exporter/frr_exporter.service.j2 b/data/templates/frr_exporter/frr_exporter.service.j2 new file mode 100644 index 000000000..c3892e42b --- /dev/null +++ b/data/templates/frr_exporter/frr_exporter.service.j2 @@ -0,0 +1,20 @@ +{% set vrf_command = 'ip vrf exec ' ~ vrf ~ ' runuser -u frr -- ' if vrf is vyos_defined else '' %} +[Unit] +Description=FRR Exporter +Documentation=https://github.com/tynany/frr_exporter +After=network.target + +[Service] +{% if vrf is not vyos_defined %} +User=frr +{% endif %} +ExecStart={{ vrf_command }}/usr/sbin/frr_exporter \ +{% if listen_address is vyos_defined %} +{% for address in listen_address %} + --web.listen-address={{ address }}:{{ port }} +{% endfor %} +{% else %} + --web.listen-address=:{{ port }} +{% endif %} +[Install] +WantedBy=multi-user.target |