formula-prometheus-ng/prometheus/files/node_exporter.systemd.jinja

24 lines
535 B
Text
Raw Normal View History

2016-10-04 11:03:07 -04:00
[Unit]
Description=Prometheus exporter for machine metrics
Documentation=https://github.com/prometheus/node_exporter
Wants=basic.target
After=basic.target network.target
[Service]
User={{ user }}
Group={{ group }}
2016-10-04 11:03:07 -04:00
EnvironmentFile=/etc/default/node_exporter
ExecStart={{ bin_path }}/node_exporter $ARGS
{%- if args is string %}} {{ args }}{% else %}
{%- for arg in args %}} \
{{ arg }}
{%- endfor %}
{%- endif %}
2016-10-04 11:03:07 -04:00
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Restart=always
RestartSec=42s
[Install]
WantedBy=multi-user.target