1

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)
...
jmcollin92
  • 2,896
  • 6
  • 27
  • 49
  • Try to run it with: When the operator executes docker run --privileged, Docker will enable to access to all devices on the host as well as set some configuration in AppArmor or SELinux to allow the container nearly all the same access to the host as processes running outside containers on the host. – opHASnoNAME Nov 22 '16 at 12:01
  • Nothing change with --privileged. Curiously I remark that topbeat give infos on FS : /var/log (give in -v), /etc/resolv.conf (never given anywhere !!) and /etc/hosts (never given anywhere too). This behaviour is the same with --privilieged and not. How does Topbeat find its FS ? – jmcollin92 Nov 22 '16 at 13:50
  • Check for upgrading to `metricbeat`, it is an extension of `topbeat` with additional features – G.S Feb 09 '17 at 11:55

0 Answers0