Skip to content

cAdvisor

Anselmo Battisti edited this page May 17, 2020 · 2 revisions

cAdvisor is a great tool to analyze the status of containers. To use cAdvisor follow the above steps.

1 - To get the image

docker pull  gcr.io/google-containers/cadvisor:v0.36.0

2 - To run the container,

sudo docker run \
  --volume=/:/rootfs:ro \
  --volume=/var/run:/var/run:ro \
  --volume=/sys:/sys:ro \
  --volume=/var/lib/docker/:/var/lib/docker:ro \
  --volume=/dev/disk/:/dev/disk:ro \
  --publish=8084:8080 \
  --detach=true \
  --name=cadvisor \
  gcr.io/google-containers/cadvisor:v0.36.0

Access it via localhost:8084

To get data from API

http://localhost:8084/api/v1.2//docker/b6e407f14c5a3a89fc0e6b3215d223eaf14b42fe091fe4e912674aacc0fe55f6