Ad Widget

Collapse

Sum values from jsonpath

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Zabbix_Julian
    Junior Member
    • Jul 2022
    • 25

    #1

    Sum values from jsonpath

    Hello all,

    I created an item with an HTTP agent.
    I now want to monitor a Json file.
    Here there are the following 2 entries: "ErrorCount & NewCount", the item should now sum both values from the json.
    Click image for larger version

Name:	image.png
Views:	590
Size:	48.8 KB
ID:	454345

    So: ErrorCount 16 + NewCount 217 = 233

    Does anyone have an idea how I can do this in preprocessing?
    Click image for larger version

Name:	image.png
Views:	569
Size:	30.8 KB
ID:	454346

    Thanks in advance.
  • Semiadmin
    Senior Member
    • Oct 2014
    • 1625

    #2
    $.['ErrorCount','NewCount'].sum()

    Comment

    Working...