Eric Renfro
ce7512d643
* Changed references to salt://prometheus-ng/... * Added generic templates for exporters. * Added variables passed on to templates.
23 lines
535 B
Django/Jinja
23 lines
535 B
Django/Jinja
[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 }}
|
|
EnvironmentFile=/etc/default/node_exporter
|
|
ExecStart={{ bin_path }}/node_exporter $ARGS
|
|
{%- if args is string %}} {{ args }}{% else %}
|
|
{%- for arg in args %}} \
|
|
{{ arg }}
|
|
{%- endfor %}
|
|
{%- endif %}
|
|
ExecReload=/bin/kill -HUP $MAINPID
|
|
KillMode=process
|
|
Restart=always
|
|
RestartSec=42s
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|