2019-05-07 23:58:35 -04:00
|
|
|
[Unit]
|
|
|
|
Description=Prometheus {{ exporter }} Exporter
|
|
|
|
Documentation=https://prometheus.io/docs/introduction/overview/
|
|
|
|
After=network-online.target
|
|
|
|
|
|
|
|
[Service]
|
2019-05-08 00:02:33 -04:00
|
|
|
EnvironmentFile=-/etc/default/{{ svc_name }}
|
2019-05-07 23:58:35 -04:00
|
|
|
User={{ user }}
|
|
|
|
Group={{ user }}
|
|
|
|
Restart=on-failure
|
2019-05-08 00:17:10 -04:00
|
|
|
ExecStart=/opt/prometheus/{{ exporter }}/bin/{{ svc_name }}
|
2019-05-08 00:27:14 -04:00
|
|
|
{%- if svc_args is string %}{{ svc_args }}{% else %}
|
2019-05-08 00:31:30 -04:00
|
|
|
{%- for svc_arg in svc_args %} \
|
2019-05-08 00:17:10 -04:00
|
|
|
{{ svc_arg }}
|
|
|
|
{%- endfor %}
|
2019-05-08 00:14:35 -04:00
|
|
|
{%- endif %}
|
2019-05-07 23:58:35 -04:00
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|