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

JSONPath cannot get keys instead of value

    XMLWordPrintable

Details

    • Problem report
    • Status: Closed
    • Trivial
    • Resolution: Won't fix
    • 6.0.3, 6.0.4
    • None
    • Server (S)
    • Team C

    Description

      Hello,

      I have a 1110 line JSON that I am referencing via an LLD Discovery Rule.

      There is an array in the JSON that is 3 elements long with a bunch of subsequent segments.

      Here is a snippet of my JSON, the array, keys, and segments I am referring to...

      Ultimately I want to grab the keys of each element [0,1,2]. I found I can accomplish this with *~ here...
      https://stackoverflow.com/questions/46471516/get-keys-in-json

      Here is a picture of it working in jsonpath.com...

      Here I am using it as an LLD Macro...

      But I get the following error message: Cannot process LLD macro "{#MACRO}": unsupported construct in jsonpath starting with: "~]".

      Is this a bug or limitation in Zabbix? Is there a different way to accomplish this?

      Attachments

        Activity

          People

            kprutkovs Konstantins Prutkovs
            Anonymouse Anonymouse
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: