According to Zabbix's documentation, since 4.2 we have not needed the "data" field for json values.
However, on 4.4.3 i constantly need to write custom javascript to put a json return into a data array. Am i hitting a weird bug, or am i reading the documentation wrong? My json return from Jenkin's api is valid, and so are my json paths.
Note that since Zabbix 4.2, the format of the JSON returned by low-level discovery rules has been changed. It is no longer expected that the JSON will contain the "data" object. Low-level discovery will now accept a normal JSON containing an array, in order to support new features such as the item value preprocessing and custom paths to low-level discovery macro values in a JSON document.
Built-in discovery keys have been updated to return an array of LLD rows at the root of JSON document. Zabbix will automatically extract a macro and value if an array field uses the {#MACRO} syntax as a key. Any new native discovery checks will use the new syntax without the "data" elements. When processing a low-level discovery value first the root is located (array at $. or $.data).
Built-in discovery keys have been updated to return an array of LLD rows at the root of JSON document. Zabbix will automatically extract a macro and value if an array field uses the {#MACRO} syntax as a key. Any new native discovery checks will use the new syntax without the "data" elements. When processing a low-level discovery value first the root is located (array at $. or $.data).
However, on 4.4.3 i constantly need to write custom javascript to put a json return into a data array. Am i hitting a weird bug, or am i reading the documentation wrong? My json return from Jenkin's api is valid, and so are my json paths.
Comment