Prometheus

cadvisor

Déploiement cadvisor

docker run -d --rm --name cadvisor -v /:/rootfs:ro -v /var/run:/var/run:ro -v /sys:/sys:ro -v /var/lib/docker/:/var/lib/docker:ro -v /dev/disk/:/dev/disk:ro -p 8180:8080 --detach=true --privileged --device=/dev/kmsg gcr.io/cadvisor/cadvisor:latest

memory % : (container_memory_usage_bytes{id= »/ »} * 100 / container_spec_memory_limit_bytes{id= »/ »}) – (container_memory_cache{id= »/ »} * 100 / container_spec_memory_limit_bytes{id= »/ »})

cpu % : sum (rate (container_cpu_usage_seconds_total{id= »/ »}[1m])) / sum (machine_cpu_cores) * 100

Inode % : 100 – (container_fs_inodes_free{device= »/dev/sda5″, id= »/ »} * 100 / container_fs_inodes_total{device= »/dev/sda5″, id= »/ »})

fs : A : container_fs_usage_bytes{device= »/dev/sda5″,id= »/ »} / 1024 / 1024 / 1024 B : container_fs_limit_bytes{device= »/dev/sda5″,id= »/ »} / 1024 / 1024 / 1024

SWAP A : container_memory_swap{id= »/ »} / 1024 / 1024 / 1024 B : container_spec_memory_swap_limit_bytes{id= »/ »} / 1024 / 1024 / 1024