Uploaded image for project: 'ZABBIX FEATURE REQUESTS'
  1. ZABBIX FEATURE REQUESTS
  2. ZBXNEXT-6172

Ability to use highly nested JSON in LLD

XMLWordPrintable

    • Icon: Change Request Change Request
    • Resolution: Unresolved
    • Icon: Trivial Trivial
    • None
    • 5.0.3
    • None
    • None

      I have a JSON file

      {
         "data": {
            "carts": [
               {
                    "user_id": 1,
                    "user_name": "John",
                    "total_price": 34
                    "in_cart" : [
                      {
                         "products": [{
                                     "product_id": 1,
                                     "price": 30
                                 },
                                 {
                                     "product_id": 3,
                                     "price": 4
                                 }
                         ]
                       }
                    ]
                },
               {
                    "user_id": 2
                    "user_name": "Kate",
                    "total_price": 5,
                    "in_cart" : [
                      {
                         "products": [
                             {
                                 "product_id": 3,
                                 "price": 5
                              }
                         ]
                      }
                    ]
                }
            ]
         }
      }
      

      I need to discovery every product of each user.
      I have created some screenshot to show you how it should be.
      You can see that

      {#PRODUCT_ID}
      

      macros could not be "opened".

      return_json is a external script
      UserParameter=return_json[*], python /opt/return_json.py
      This scrip returns:

      {"data": {"carts": [{"user_name": "John", "total_price": 34, "user_id": 1, "in_cart": [{"products": [{"price": 30, "product_id": 1}, {"price": 4, "product_id": 3}]}]}, {"user_name": "Kate", "total_price": 5, "user_id": 2, "in_cart": [{"products": [{"price": 5, "product_id": 3}]}]}]}}
      

      So I'm looking forward to be able to discovery any nested JSON file.

        1. discovery_1-1.png
          discovery_1-1.png
          8 kB
        2. discovery_2-2.png
          discovery_2-2.png
          11 kB
        3. discovery_3-1.png
          discovery_3-1.png
          8 kB
        4. discovery_4-1.png
          discovery_4-1.png
          6 kB

            Unassigned Unassigned
            Rostislav Gutsycat
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: