ansible-role-docker_nodeexp.../templates/docker-compose.yml

29 lines
817 B
YAML
Raw Normal View History

2022-06-12 23:07:59 +02:00
# {{ ansible_managed }}
services:
nodeexporter:
image: prom/node-exporter:{{ docker_nodeexporter_version }}
environment:
- TZ=Europe/Paris
volumes:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /:/rootfs:ro
{% if docker_nodeexporter_enable_tlsauth %}
- ./config.yml:/config.yml
- ./key.pem:/key.pem
- ./cert.pem:/cert.pem
{% endif %}
2022-06-12 23:07:59 +02:00
command:
- '--path.procfs=/host/proc'
- '--path.rootfs=/rootfs'
- '--path.sysfs=/host/sys'
- '--collector.filesystem.mount-points-exclude=^/(sys|proc|dev|host|etc|run)($$|/)'
{% if docker_nodeexporter_enable_tlsauth %}
- '--web.config.file=/config.yml'
{% endif %}
2022-06-12 23:07:59 +02:00
restart: always
labels:
org.label-schema.group: "monitoring"
ports:
- {{ docker_nodeexporter_port }}:9100