Docker Monitoring
Last updated - 02 December, 2025
Our Docker LogicModule monitors resource usage within Docker containers. To do so it requires the installation of the “cAdvisor” monitoring container within your docker service.
Note: cAdvisor does not work on RHEL 7.6. For more information, see this report.
Installing cAdvisor
To install cAdvisor, execute the following commands on your Docker host:
sudo docker run \
--volume=/:/rootfs:ro \
--volume=/var/run:/var/run:ro \
--volume=/sys:/sys:ro \
--volume=/var/lib/docker/:/var/lib/docker:ro \
--publish=8080:8080 \
--detach=true \
--name=cadvisor \
gcr.io/cadvisor/cadvisor:latestOnce cAdvisor is running, LogicMonitor will discover containers as instances and begin gathering data.
For more information, see https://github.com/google/cadvisor/
Running cAdvisor on RHEL and Centos
On RHEL and Centos systems you’ll need to add these install options to ensure proper operation of cAdvisor:
--privileged=true \
--volume=/cgroup:/cgroup:ro \Running cAdvisor on Docker
On older versions of Docker (< 1.2) you may need to specify the root volume access option as:
--volume=//:/rootfs:ro \Running cAdvisor on Docker Swarm
If you are deploying cAdvisor as a service in Docker Swarm (typically in global mode, one task per node), you must publish its port in host mode to bypass Swarm’s ingress routing mesh. Without this configuration, requests can be load balanced across nodes, resulting in inconsistent data collection. Each cAdvisor endpoint is node-local and reports only on containers running on the node where that task is hosted.
The following example shows how to configure host-mode publishing in docker-compose.yml:
ports:
- target: 8080
published: 8080
protocol: tcp
mode: hostThis configuration ensures that the LogicMonitor Collector connects directly to the monitored node so the data returned accurately reflects the containers running on that specific node. For more information, see Bypass the routing mesh from Docker.