2022-06-12 23:09:06 +02:00
# {{ ansible_managed }}
2023-01-01 18:30:41 +01:00
# disable_metrics permet de gagner beaucoup de cpu cadvisor
2023-11-29 16:38:03 +01:00
# all metrics : advtcp,app,cpu,cpuLoad,cpu_topology,cpuset,disk,diskIO,hugetlb,memory,memory_numa,network,oom_event,percpu,perf_event,process,referenced_memory,resctrl,sched,tcp,udp
2023-01-01 18:30:41 +01:00
# enable_metrics surcharge disable_metrics
# pour y voir clair : disable_metrics => on met tout, et dans enable_metrics : ce qu'on veut seulement
2022-06-12 23:09:06 +02:00
services :
cadvisor :
image : gcr.io/cadvisor/cadvisor:{{ docker_cadvisor_version }}
privileged : true
2023-01-01 18:30:41 +01:00
command :
- "-housekeeping_interval=30s"
- "-docker_only=true"
- "-enable_metrics=cpu,memory,network,diskIO"
2023-11-29 16:38:03 +01:00
- "-disable_metrics=advtcp,app,cpu,cpuLoad,cpu_topology,cpuset,disk,diskIO,hugetlb,memory,memory_numa,network,oom_event,percpu,perf_event,process,referenced_memory,resctrl,sched,tcp,udp"
2022-06-12 23:09:06 +02:00
devices :
- /dev/kmsg:/dev/kmsg
volumes :
- /:/rootfs:ro
- /var/run:/var/run:ro
- /sys:/sys:ro
- {{ docker_cadvisor_data_dir }}/docker:/var/lib/docker:ro
restart : always
userns_mode : host
ports :
- {{ docker_cadvisor_port }}:8080
labels :
org.label-schema.group : "monitoring"