How to monitor host's filesystem in a dockerized Topbeat

199 views Asked by At

I want to monitor my hosts with Elasticsearch Topbeat. But running Topbeat in a Docker container seems that the container don't see the FS of the host but only what is mounted with --volume run option. Example :

root$ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/vda1       6.9G  2.0G  4.7G  30% /

root$ docker run --name Topbeat --net host --pid host --dns=127.0.0.1 --volume /var/log:/var/log frg-topbeat:latest

root$ docker exec -it Topbeat df -h
Filesystem      Size  Used Avail Use% Mounted on
none            6.9G  2.0G  4.7G  30% /
tmpfs           501M     0  501M   0% /dev
tmpfs           501M     0  501M   0% /sys/fs/cgroup
/dev/vda1       6.9G  2.0G  4.7G  30% /var/log       <-- I wanted to see the / mount point and not only /var/log
shm              64M     0   64M   0% /dev/shm

Update 1: all FS monitored by Topbeat comes from the 'mount' command:

root$ docker exec -it Topbeat /bin/bash 
root@tst-rpx-master-0:/# mount
...
/dev/vda1 on /var/log type ext3 (rw,relatime,errors=remount-ro,data=ordered)
/dev/vda1 on /etc/resolv.conf type ext3 (rw,relatime,errors=remount-ro,data=ordered)
/dev/vda1 on /etc/hostname type ext3 (rw,relatime,errors=remount-ro,data=ordered)
/dev/vda1 on /etc/hosts type ext3 (rw,relatime,errors=remount-ro,data=ordered)
...
0

There are 0 answers