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

LLD Macro documentation example non functional

XMLWordPrintable

    • Icon: Documentation task Documentation task
    • Resolution: Fixed
    • Icon: Trivial Trivial
    • 5.0 (plan)
    • 4.2.6
    • Documentation (D)
    • None
    • Sprint 57 (Oct 2019), Sprint 58 (Nov 2019), Sprint 59 (Dec 2019), Sprint 60 (Jan 2020)

      I am looking at the documentation for LLD macro creation. at LLDMacro documentation. The section starting with the text

      Custom macros
      The LLD macros tab allows to specify low-level discovery macro mappings with a custom JSONPath...
      

      When attempting to replicate the example using the vfs.fs.discovery discovery, I am unable to get the example to work. The only alteration I made is the name of the "LLD Macro" name was changed to "{#DISK_PFREE_MINIMUM}" instead of "#FSNAME" as used in the example.

      Based on the above section, the examples on the same page under the section titled "Using LLD macros in user macro contexts" I have been unable to get this to work as described.

      When I tested this, I was able to successfully run the discovery, but the macro was never added to the host macros for that host.

      If an alteration to the example provided could be made that uses the current vfs.fs.discovery JSON output, I believe this would be a little less confusing.

      Below is an example of the standard output from the zabbix agent for that discovery.

       [root@mhdal13zm01 ~]# /usr/sbin/zabbix_agentd -c /etc/zabbix/zabbix_agentd.conf -t vfs.fs.discovery
      vfs.fs.discovery                              [s|[{"{#FSNAME}":"/","{#FSTYPE}":"rootfs"},{"{#FSNAME}":"/sys","{#FSTYPE}":"sysfs"},{"{#FSNAME}":"/proc","{#FSTYPE}":"proc"},{"{#FSNAME}":"/dev","{#FSTYPE}":"devtmpfs"},{"{#FSNAME}":"/sys/kernel/security","{#FSTYPE}":"securityfs"},{"{#FSNAME}":"/dev/shm","{#FSTYPE}":"tmpfs"},{"{#FSNAME}":"/dev/pts","{#FSTYPE}":"devpts"},{"{#FSNAME}":"/run","{#FSTYPE}":"tmpfs"},{"{#FSNAME}":"/sys/fs/cgroup","{#FSTYPE}":"tmpfs"},{"{#FSNAME}":"/sys/fs/cgroup/systemd","{#FSTYPE}":"cgroup"},{"{#FSNAME}":"/sys/fs/pstore","{#FSTYPE}":"pstore"},{"{#FSNAME}":"/sys/fs/cgroup/net_cls,net_prio","{#FSTYPE}":"cgroup"},{"{#FSNAME}":"/sys/fs/cgroup/freezer","{#FSTYPE}":"cgroup"},{"{#FSNAME}":"/sys/fs/cgroup/pids","{#FSTYPE}":"cgroup"},{"{#FSNAME}":"/sys/fs/cgroup/devices","{#FSTYPE}":"cgroup"},{"{#FSNAME}":"/sys/fs/cgroup/memory","{#FSTYPE}":"cgroup"},{"{#FSNAME}":"/sys/fs/cgroup/perf_event","{#FSTYPE}":"cgroup"},{"{#FSNAME}":"/sys/fs/cgroup/hugetlb","{#FSTYPE}":"cgroup"},{"{#FSNAME}":"/sys/fs/cgroup/blkio","{#FSTYPE}":"cgroup"},{"{#FSNAME}":"/sys/fs/cgroup/cpu,cpuacct","{#FSTYPE}":"cgroup"},{"{#FSNAME}":"/sys/fs/cgroup/cpuset","{#FSTYPE}":"cgroup"},{"{#FSNAME}":"/sys/kernel/config","{#FSTYPE}":"configfs"},{"{#FSNAME}":"/","{#FSTYPE}":"xfs"},{"{#FSNAME}":"/usr","{#FSTYPE}":"xfs"},{"{#FSNAME}":"/proc/sys/fs/binfmt_misc","{#FSTYPE}":"autofs"},{"{#FSNAME}":"/dev/mqueue","{#FSTYPE}":"mqueue"},{"{#FSNAME}":"/sys/kernel/debug","{#FSTYPE}":"debugfs"},{"{#FSNAME}":"/dev/hugepages","{#FSTYPE}":"hugetlbfs"},{"{#FSNAME}":"/boot","{#FSTYPE}":"xfs"},{"{#FSNAME}":"/tmp","{#FSTYPE}":"xfs"},{"{#FSNAME}":"/home","{#FSTYPE}":"xfs"},{"{#FSNAME}":"/var","{#FSTYPE}":"xfs"},{"{#FSNAME}":"/var/lib/mysql","{#FSTYPE}":"xfs"},{"{#FSNAME}":"/var/log","{#FSTYPE}":"xfs"},{"{#FSNAME}":"/var/tmp","{#FSTYPE}":"xfs"},{"{#FSNAME}":"/var/log/audit","{#FSTYPE}":"xfs"},{"{#FSNAME}":"/run/user/1596401759","{#FSTYPE}":"tmpfs"}]]
      [root@mhdal13zm01 ~]#
      

        1. screenshot-1.png
          screenshot-1.png
          57 kB
        2. screenshot-2.png
          screenshot-2.png
          81 kB
        3. screenshot-3.png
          screenshot-3.png
          52 kB
        4. screenshot-4.png
          screenshot-4.png
          5 kB
        5. screenshot-5.png
          screenshot-5.png
          78 kB

            martins-v Martins Valkovskis
            cdslaughter Carl Slaughter
            Team D
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: