Ad Widget

Collapse

Problem with JSONPath and preprocessing

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • schrobbl
    Junior Member
    • Sep 2020
    • 1

    #1

    Problem with JSONPath and preprocessing

    Hello,

    I am get some data via an ITEM x to my ZABBIX Server:
    {"data":[
    {
    "zonename":"total",
    "cpuused":1.23,
    "cpuusedp":5.16,
    "physmemused":84427094016,
    "physmemusedp":81.91,
    "virtmemused":89590183936,
    "physmemusedp":85.14
    },
    {
    "zonename":"system",
    "cpuused":0.13,
    "cpuusedp":0.55,
    "physmemused":39016638464,
    "physmemusedp":37.85,
    "virtmemused":40151357440,
    "physmemusedp":38.16
    }]}

    When I define another item with dependent on item x I cannot extract some value:
    Preprocessing->JSONPath->$.[?(@.zonename == 'system')].cpuused
    I always get an error like:
    "cannot extract value from json by path "$.[?(@.zonename == 'system')].cpuused": object not found in jsonpath segment 1"

    What I am doing wrong?

    Regards
    Schrobbl
Working...