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
|
|
|
|
command:
|
|
|
|
- '--path.procfs=/host/proc'
|
|
|
|
- '--path.rootfs=/rootfs'
|
|
|
|
- '--path.sysfs=/host/sys'
|
2024-04-06 20:22:30 +02:00
|
|
|
- '--collector.filesystem.mount-points-exclude=^/(sys|proc|dev|host|etc|run)($$|/)'
|
2022-06-12 23:07:59 +02:00
|
|
|
restart: always
|
|
|
|
labels:
|
2024-12-25 21:52:16 +01:00
|
|
|
org.label-schema.group: monitoring
|
|
|
|
traefik.enable: true
|
|
|
|
traefik.docker.network: traefik
|
|
|
|
traefik.http.routers.nodeexporter.entrypoints: nodeexporter
|
|
|
|
traefik.http.routers.nodeexporter.tls: true
|
|
|
|
traefik.http.routers.nodeexporter.rule: Host(`{{ ansible_fqdn }}`)
|
|
|
|
traefik.http.services.nodeexporter.loadbalancer.server.port: 9100
|
|
|
|
traefik.http.routers.nodeexporter.middlewares: nodeexporter_auth
|
|
|
|
traefik.http.middlewares.nodeexporter_auth.basicauth.users: "{{ docker_nodeexporter_auth_user }}:{{ docker_nodeexporter_auth_password }}"
|
2022-06-12 23:07:59 +02:00
|
|
|
ports:
|
|
|
|
- {{ docker_nodeexporter_port }}:9100
|
2024-12-25 21:52:16 +01:00
|
|
|
|
|
|
|
networks:
|
|
|
|
traefik:
|
|
|
|
external: true
|