Ad Widget

Collapse

vfs.fs.size usage

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Bagatel
    Junior Member
    • Aug 2020
    • 2

    #1

    vfs.fs.size usage

    Hello,

    Using 5.0.1 here under docker, for both agent2 and server.

    When trying to get the disk space on Linux servers, it works for root:

    Code:
    $ zabbix_get -s server.com -k vfs.fs.size[/,pused]
    44.334697
    But not for any other mount points:

    Code:
    $ zabbix_get -s server.com -k vfs.fs.size[/mnt/SAN,pused]
    ZBX_NOTSUPPORTED: Cannot obtain filesystem information: [2] No such file or directory
    Code:
    $ LANG=en df -h
    Filesystem Size Used Avail Use% Mounted on
    udev 16G 0 16G 0% /dev
    tmpfs 3.2G 876K 3.2G 1% /run
    /dev/sda2 106G 45G 56G 45% /
    tmpfs 16G 96K 16G 1% /dev/shm
    tmpfs 5.0M 0 5.0M 0% /run/lock
    tmpfs 16G 0 16G 0% /sys/fs/cgroup
    /dev/sda1 181M 159M 8.7M 95% /boot
    tmpfs 3.2G 0 3.2G 0% /run/user/1000
    /dev/sdb1 252G 85G 168G 34% /mnt/SAN
    What am I doing wrong?
  • Atsushi
    Senior Member
    • Aug 2013
    • 2028

    #2
    Is it possible to refer to the mount information of the target disk from the container that started the agent? What arguments did you specify when you started agent2? Isn't the output of the df command you wrote down the information on the Docker host, not on the container where the agent is running?

    Comment

    • Bagatel
      Junior Member
      • Aug 2020
      • 2

      #3
      Thanks for the hints!
      I thought that using the "--privileged" option would be enough for the container to directly access the host resources, but that doesn't look enough indeed. Adding the following options did work:
      Code:
       --privileged --network host -v "/var/run/docker.sock":"/var/run/docker.sock" -v /mnt/SAN:/mnt/SAN:ro
      Si I can now monitor the host's network interfaces and mount points. However that means I have to custom the command line for each server to match its mount points. Any idea to streamline this?

      I guess that information is worth adding to https://hub.docker.com/r/zabbix/zabbix-agent2

      Thanks,

      Comment

      Working...