Below you will find pages that utilize the taxonomy term “Docker-Compose”
Posts
read more
Run cAdvisor when using Docker Compose
cAdvisor
has long been a favorite monitoring tool of mine. I’m using Docker Compose for local testing and have begun including a cAdvisor
in my docker-compose.yaml
files.
cadvisor:
restart: always
image: google/cadvisor:${CADVISOR_VERSION}
container_name: cadvisor
# command:
# - --prometheus_endpoint="/metrics" # Default
volumes:
- "/:/rootfs:ro"
- "/var/run:/var/run:rw"
- "/sys:/sys:ro"
- "/var/snap/docker/current:/var/lib/docker:ro" #- "/var/lib/docker/:/var/lib/docker:ro"
expose:
- "8080"
ports:
- 8080:8080
I’d not realized until recently, that cAdvisor
also surfaces a Prometheus metrics endpoint and so, if you do follow this path and you’re also using Prometheus, don’t forget to add cAdvisor
to your Prometheus targets.