Closed achekalin closed 7 years ago
docker.service
is not a docker container, but it's systemd unit. So in the theory you can use https://github.com/monitoringartist/zabbix-systemd-monitoring. However module will detect docker and it will use docker cgroup path, not a systemd path => it's not possible atm. I was thinking about this issue before, but it needs implementation.
Oh, I got your idea, I really missed that '.service' part of the path. Well, what I need is to keep track of docker containers, but on my server I can see your module can check all but 'memory'-based values.
Are there any way to monitor these without systemd, for example? I don't want to deal with systemd if we can bypass it, since it'll be less complex and more robust way, I suspect.
Yes, this module is for Docker container monitoring. Docker is based on cgroups and systemd is based on cgroups as well => additional feature of this module is that is able to monitor also systemd units. If you need to monitor only Docker container, then use it only for Docker container -> np.
Ok, but what is the right way to monitor container memory now? I think it should be possible to use plaint old approach anyway, isn't it? I just miss how to do that. Look, https://github.com/monitoringartist/zabbix-systemd-monitoring provides only templates, not module itself (and frankly speaking I need module not container images), so I can't build it to test.
Please read readme. Forgot about https://github.com/monitoringartist/zabbix-systemd-monitoring - you want to monitor containers, not systemd units.
For some reason I can see on my RHEL 7 host the following paths available:
where appropriate metrics files are located.
The module itself checks
/sys/fs/cgroup/memory/docker/$CONTAINER_ID/memory.stat
, not/sys/fs/cgroup/memory/system.slice/docker.service/docker/$CONTAINER_ID
.Is it possible to have module check these locations too?