Ad Widget

Collapse

Question on preprocessiong JSON Path

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mellis
    Senior Member
    • Oct 2017
    • 145

    #1

    Question on preprocessiong JSON Path


    I am using Zabbix Server 4.2 I think a 4.0 agent. rabbit_json.docx

    I am working on parsing an JSON out put, seem I can not get the path correct.

    Attached is an example of the JSON value.
    To get the value I am using the HTTP agent passing in a URL and looing for an TEXT output.
    In the latest values I am seeing a good JSON out put.

    in the preprocessing I am using JSONPath = $.body.node.state. when I test the error message is "cannot extract value from json by path "body.node.state" object not found starting with json path. "node.state".

  • Omniflux
    Junior Member
    • May 2019
    • 1

    #2
    This path does not match your example JSON document.

    Try using https://jsonpath.com/ to test with.

    "$.body[0].node" and "$.body[1].state" would both be valid for your example JSON document.

    Comment

    Working...