formula-prometheus-ng/prometheus/files/exporter.systemd.jinja
Eric Renfro ce7512d643
Multiple changes in preparation for the "ng" fork.
* Changed references to salt://prometheus-ng/...
* Added generic templates for exporters.
* Added variables passed on to templates.
2019-05-08 16:09:25 -04:00

26 lines
520 B
Django/Jinja

[Unit]
Description=Prometheus {{ svc }} Exporter
{%- if url is string %}
Documentation={{ url }}
{%- endif %}
Wants=basic.target
After=basic.target network.target
[Service]
User={{ user }}
Group={{ group }}
EnvironmentFile=/etc/default/{{ svc }}
ExecStart={{ bin_path }}/{{ svc }} $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