ceph-ansible/roles/ceph-node-exporter/templates/node_exporter.service.j2

29 lines
754 B
Plaintext
Raw Normal View History

# This file is managed by ansible, don't make changes here - they will be
# overwritten.
[Unit]
Description=Node Exporter
{% if container_binary == 'docker' %}
After=docker.service
{% else %}
After=network.target
{% endif %}
[Service]
EnvironmentFile=-/etc/environment
ExecStartPre=-/usr/bin/{{ container_binary }} rm -f node-exporter
ExecStart=/usr/bin/{{ container_binary }} run --name=node-exporter \
-v /proc:/host/proc:ro -v /sys:/host/sys:ro \
--net=host \
{{ node_exporter_container_image }} \
--path.procfs=/host/proc \
--path.sysfs=/host/sys \
--no-collector.timex
ExecStop=-/usr/bin/{{ container_binary }} stop node-exporter
Restart=always
RestartSec=10s
TimeoutStartSec=120
TimeoutStopSec=15
[Install]
WantedBy=multi-user.target