Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-8806

vfs.fs.discovery: use mount command to retrieve mountpoints

    XMLWordPrintable

    Details

    • Type: Incident report
    • Status: Closed
    • Priority: Trivial
    • Resolution: Won't fix
    • Affects Version/s: 2.2.4
    • Fix Version/s: None
    • Component/s: Agent (G)
    • Environment:
      Distributor ID: Ubuntu
      Description: Ubuntu 14.04 LTS
      Release: 14.04
      Codename: trusty

      Description

      I've a monitored node that has a jail filesystem mounted in /jail. But, in df -h it isn't displayed. If I execute mount, various mountpoints are displayed including /jail directories and files:

      mount
      /dev/mapper/ubuntutemplate-root on / type ext4 (rw,errors=remount-ro)
      proc on /proc type proc (rw,noexec,nosuid,nodev)
      sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
      none on /sys/fs/cgroup type tmpfs (rw)
      none on /sys/fs/fuse/connections type fusectl (rw)
      none on /sys/kernel/debug type debugfs (rw)
      none on /sys/kernel/security type securityfs (rw)
      udev on /dev type devtmpfs (rw,mode=0755)
      devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
      tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
      none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
      none on /run/shm type tmpfs (rw,nosuid,nodev)
      none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755)
      none on /sys/fs/pstore type pstore (rw)
      /dev/sda1 on /boot type ext2 (rw)
      binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
      systemd on /sys/fs/cgroup/systemd type cgroup (rw,noexec,nosuid,nodev,none,name=systemd)
      /etc/ConsoleKit on /jail/etc/ConsoleKit type none (ro,nosuid,bind)
      /etc/ImageMagick on /jail/etc/ImageMagick type none (ro,nosuid,bind)
      /etc/NetworkManager on /jail/etc/NetworkManager type none (ro,nosuid,bind)
      /etc/ODBCDataSources on /jail/etc/ODBCDataSources type none (ro,nosuid,bind)
      /etc/R on /jail/etc/R type none (ro,nosuid,bind)
      /etc/UPower on /jail/etc/UPower type none (ro,nosuid,bind)
      /etc/X11 on /jail/etc/X11 type none (ro,nosuid,bind)
      .
      .
      .
      

      As you can see, all jailed mountpoints are listed with none fs type.

      But, vfs.fs.discovery result is considering those mountpoints as ext4 filesystems. This is because (I think!) that vfs.fs.discovery reads /proc/mounts to retrieve the mounted filesystems instead of executing the mount command. The json returned by vfs.fs.discovery is attached as vfs.fs.discovery.json.

      This is causing a problem to me because the Filter of my filesystem discovery rule configuration is considering {#FSTYPE} macro and the global regex is the above:

      File systems for discovery
      ^(btrfs|ext2|ext3|ext4|jfs|reiser|xfs|ffs|ufs|jfs|jfs2|vxfs|hfs|ntfs|fat32|zfs)$
      

      I can't change {#FSTYPE} to {#FSNAME} to filter those filesystem names because there are many VMs in my datacenter that could have a real ext4 device mounted at /jail.

      I've tried to make another script (vfs.fs.discovery.py) to consider the mount command output instead of /proc/mounts content. But, I'll need to distribute it to all of my VMs because the Mounted filesystem discovery rule is associated with my Linux Basic Template that is used with all of them.

      So, I suggest to change the behaviour of vfs.fs.discovery to consider the mount command output instead of /proc/mounts content.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            bruno.galindro Bruno Galindro da Costa
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: