Setting up performance monitoring
We have tools such as SNMP, Nagios, and so on to monitor bare metal, VM performance. Similarly, there are a few tools/plugins available to monitor container performance such as cAdvisor (https://github.com/google/cadvisor) and Prometheus (https://prometheus.io). In this recipe, let's see how we can configure cAdvisor.
Getting ready
Perform the following to set up cAdvisor:
- The easiest way to run cAdvisor is to run its
docker container
, which can be done with the following command:
$ sudo docker container run \ --volume=/:/rootfs:ro \ --volume=/var/run:/var/run:rw \ --volume=/sys:/sys:ro \ --volume=/var/lib/docker/:/var/lib/docker:ro \ --publish=8080:8080 \ --detach=true \ --name=cadvisor \ google/cadvisor:latest
- If you want to run cAdvisor outside Docker, then follow the instructions given on the cAdvisor home page: https://github.com/google/cadvisor/blob/master/docs/running.md#standalone.
How to do it...
After the container starts...