vfs.file.get does not return a Json array usable by LLDs

XMLWordPrintable

    • Type: Incident report
    • Resolution: Won't fix
    • Priority: Minor
    • None
    • Affects Version/s: 6.0.12, 6.2.6
    • Component/s: Agent2 plugin (G)
    • None
    • Environment:
      Linux

      Description :

      Hi, I am trying to create a LLD based on the key vfs.file.get[/opt/dir/myfile] which returns a JSON according to the documentation.

      But Zabbix says: cannot find the data array in the received JSON object when i try to use it.

       

      As mentioned here https://support.zabbix.com/browse/ZBX-17685 :

      "LLD expects an array of objects as input. It can be on its own like"

       

      [{...},{...},...] 

       

       

      1. deed, the key
      2. vfs.file.get returns a JSON, but not in an array :

       

      # zabbix_agent2 -t vfs.file.get[/opt/dir/myfile]
      [s|{"basename":"myfile","pathname":"/opt/dir/myfile","dirname":", [...] }] 

       

       

      Whereas the key vfs.dir.get which returns an array in the correct format. Notice the difference : the return json have a usable array for LLDs "[{*} \{json} {*}]" :

       

      # zabbix_agent2 -t vfs.dir.get[/opt/dir/]
      [s|[{"basename":"myfile","pathname":"/opt/dir/myfile","dirname":",[...] }]] 

       

       

      Does this behavior is expected or it a bug?

      Thx,

       

      My environment : Zabbix_agent2 : 6.2.6 , OS CentOS Stream 8

            Assignee:
            Aigars Kadikis
            Reporter:
            David Ega
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: