View json data in table - Grafana

Hello everyone,

I have json data in the following structure and I want to view id,severity,deviceDisplay etc in a table In grafana panel.
Im using Infinity Datasource , with the following uql query :

{
  "list": [
    {
      "count": "304"
    },
    {
      "faultRealTime": [
        {
          "faultRealTimeList": [
            {
              "id": "9924511"
            },
            {
              "severity": "3"
            },
            {
              "deviceDisplay": "192.168.9.10"
            },
            {
              "faultDesc": "The instance \"[Interface:GigabitEthernet1/0/34]\" of \"performance task\" \"Interface Receiving Rate\" is in threshold range (\"\u003e=1Mbps\"), current value is \"1.398Mbps\"."
            },
            {
              "sourceIp": "192.168.9.10"
            },
            {
              "faultTime": "1662475220"
            },
            {
              "userAckType": "0"
            },
            {
              "userAckUserName": [
                
              ]
            }
          ]
        },
        {
          "faultRealTimeList": [
            {
              "id": "9924510"
            },
            {
              "severity": "2"
            },
            {
              "deviceDisplay": "192.168.10.237"
            },
            {
              "faultDesc": "The interface GigabitEthernet1/0/20 is DOWN."
            },
            {
              "sourceIp": "192.168.10.237"
            },
            {
              "faultTime": "1662475121"
            },
            {
              "userAckType": "0"
            },
            {
              "userAckUserName": [
                
              ]
            }
          ]
        }
      ]
    }
  ]
}

If someone can point the error please or have any information that can help !

Use jsonata

parse-json
| jsonata "list.faultRealTime"

then Transformation of Extract Field

image

1 Like

Thanks a lot, have a blessed day !

1 Like