Pages

Tuesday, April 9, 2019

Container Monitoring - Container Advisor (CAdvisor)

CAdvisor is a open source container resource usage collector Which contains a native support for docker containers. CAdvisor works per node basis. Once a node is installed with the CAdvisor container it auto discovers all containers in the given node and collect CPU, memory , file system and network usage statistics. This provides the overall machine usage by analyzing the root container on the machine.

CAdvisor also supports exporting stats to various storage plugins like elasticsearch, influxDB etc. The collected metrics can be viewed on WEB-UI which exports live information about all containers on the machine. This also exposes raw and processed stats via a versioned remote REST Api.

Running CAdvisor - Run the cadvisor container by using the docker run command as below,
jagadishAvailable$Thu Mar 21@ docker run --volume=/:/rootfs:ro --volume=/var/run:/var/run:rw --volume=/sys:/sys:ro --volume=/var/lib/docker/:/var/lib/docker:ro --volume=/dev/disk/:/dev/disk:ro --publish=18080:8080 --detach=true --name=cadvisor google/cadvisor:latest
Unable to find image 'google/cadvisor:latest' locally
latest: Pulling from google/cadvisor
ff3a5c916c92: Already exists
44a45bb65cdf: Pull complete
0bbe1a2fe2a6: Pull complete

Digest: sha256:815386ebbe9a3490f38785ab11bda34ec8dacf4634af77b8912832d4f85dca04
Status: Downloaded newer image for google/cadvisor:latest
6d3b3178af72f40c42f197df1467b07b86f1331fd9f3aaa7b8bfa0c42994ef48

Once the container starts running, we can access the web application on “http://localhost:18080” url. below are the screenshots which gives us more details about the containers that run in the machine.








More to Come, Happy learning :-)

No comments :

Post a Comment