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

JSONPath cannot get keys instead of value

XMLWordPrintable

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

      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?

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

              Created:
              Updated:
              Resolved: