TransWikia.com

Working with array of object in Zabbix

Server Fault Asked by Yury on November 4, 2021

My HTTP agent on Zabbix recieve data representing count of client’s orders:

{
  "orders": [
    {
      "client_id": 1,
      "count": 2
    },
    {
      "client_id": 2,
      "count": 3
    },
    {
      "client_id": 3,
      "count": 1
    }
  ]
}

How to create items and then graph of orders count for each client? I know about JSONPath and catching certain fields from JSON, but I can’t understand how to work with key:value data.

Thanx!

One Answer

I suggest creating main iteam which stores hole JSON and creating multiple dependent items to store individual values using correct preprocessing.

Answered by Paweł Zimny on November 4, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP