diff options
author | rebortg <github@ghlr.de> | 2024-09-11 14:15:07 +0200 |
---|---|---|
committer | rebortg <github@ghlr.de> | 2024-09-18 22:00:19 +0200 |
commit | a0c15a159e54cb1b6abba7a0a6a0a793a53915d0 (patch) | |
tree | 2e9d106b21c59ec5b866b34197fa5250daae6813 /data | |
parent | de8d388c9cf32eb9ef9f38abb2d6ba292f56069f (diff) | |
download | vyos-1x-a0c15a159e54cb1b6abba7a0a6a0a793a53915d0.tar.gz vyos-1x-a0c15a159e54cb1b6abba7a0a6a0a793a53915d0.zip |
T973: add basic node_exporter implementation
Diffstat (limited to 'data')
-rw-r--r-- | data/templates/node_exporter/node_exporter.service.j2 | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/data/templates/node_exporter/node_exporter.service.j2 b/data/templates/node_exporter/node_exporter.service.j2 new file mode 100644 index 000000000..01dad5aa2 --- /dev/null +++ b/data/templates/node_exporter/node_exporter.service.j2 @@ -0,0 +1,17 @@ +{% set vrf_command = 'ip vrf exec ' ~ vrf ~ ' runuser -u node_exporter -- ' if vrf is vyos_defined else '' %} +[Unit] +Description=Node Exporter +Documentation=https://github.com/prometheus/node_exporter +After=network.target + +[Service] +{% if vrf is not vyos_defined %} +User=node_exporter +{% endif %} +ExecStart={{ vrf_command }}/usr/sbin/node_exporter \ +{% for address in listen_address %} + --web.listen-address={{ address }}:{{ port }} +{% endfor %} + +[Install] +WantedBy=multi-user.target |