Ad Widget

Collapse

Beginner - Display table from JSON content in Zabbix 7.0

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • mkda_pf
    Junior Member
    • Jun 2024
    • 3

    #1

    Beginner - Display table from JSON content in Zabbix 7.0

    Hi dear community, first post here. Greets to everyone.

    I am trying to do something apparently simple, but I am having quite hard times. What I have is a JSON file containing metrics for a "certain amount" of software instances. Each server is contained into a dict element of this JSON structure. For example :

    Code:
    {
      "lines": [
      {
        "sessionNumber": 1,
        "routeName": "test1",
        "active": true
      },
      {
        "sessionNumber": 2,
        "routeName": "test2",
        "active": true
      }
      ]
    }
    I would like to display this into Zabbix (I am not sure which Widget at this point) as a Table, where each line is the content of a single instance/dictionary (i.e. "0", "1"... "N").
    The table would have an header with the column names (sessionNumber, routeName, active), and each line would contain associated instance ("0", "1"...) values.

    I have searched for similar questions here and more globally, and found this, I am currently trying to do something similar:
    Zabbix LLD : how to create items from json? - Stack Overflow
    But unsuccessfully until now - believe that it seems quite complex to "simply" display the content of a JSON object. I am maybe missing the point.

    Many, many thanks in advance for any help you could provide about this.

    PS : I can generate the JSON data in any other format if that helps to simplify the integration process, but I am not sure where to start again.

    Have an excellent day all.

    Sincerely,
    MKDA_PF.​
  • Answer selected by mkda_pf at 20-06-2024, 13:26.
    cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    There is no such widget, what would parse your json and display it as you want. The direction in that Stack Overflow article is correct. You need to define a discovery and parse required data into dependent items. You can read about it also in official docs https://www.zabbix.com/documentation...evel_discovery

    Comment

    • cyber
      Senior Member
      Zabbix Certified SpecialistZabbix Certified Professional
      • Dec 2006
      • 4807

      #2
      There is no such widget, what would parse your json and display it as you want. The direction in that Stack Overflow article is correct. You need to define a discovery and parse required data into dependent items. You can read about it also in official docs https://www.zabbix.com/documentation...evel_discovery

      Comment

      Working...