3 years ago
Container monitoring
Hello Team,
Can someone let me know if LogicMonitor can do a container monitoring ?
we have ec2 instance and there are containers running on those instances which runs some software etc...
Yeah, that's doable. Assuming you mean not in kubernetes. All you need to do is start up the cAdvisor container, which gathers information about all the containers running on the host and serves up a stats page that there's already a DataSource for.
To run cadvisor: I prefer to use docker-compose, but you can use any method you want. Here's my docker-compose file:
version: '2' services: cadvisor: image: gcr.io/cadvisor/cadvisor volumes: - /:/rootfs:ro - /var/run:/var/run:rw - /sys:/sys:ro - /var/lib/docker:/var/lib/docker:ro - /cgroup:/cgroup:ro ports: - "8080:8080" privileged: true restart: always
The datasource is called Docker_Containers_cAdvisor20, but you may need to tweak the AppliesTo to make sure your device is included. I can't remember the default, but it relies on a propertysource called addCategory_Docker, which IIRC is limited to Linux machines.
I modified the AppliesTo of the propertysource to be
(isLinux() || isWindows()) && !hasCategory("NoDocker")
And I modified the AppliesTo of the datasource to be
isLinux() || hasCategory("Docker")
Again, I can't remember what the values were before, but this is working for me, monitoring Docker on my Windows hosts.