Table Panel: Convert JSON Text to Table

I have a Zabbix Item that is just list of queues and their respective jobs, and is (hopefully) JSON formatted. I’m trying to figure out how to take that JSON Text and have it show up in a Table Panel. I have tried this:

  1. Create a New Table Panel
  2. Set the Query Mode to text
  3. Options -> Data->Table Transform set to JSON

Nothing happens, I’m unable to select any columns below and the query displays just the JSON output (as if I didn’t change it from Table to JSON

I beginning to think I don’t fully understand what I’m doing here, the documentation shows that the Table Transform to JSON just magically happens.

I’m also wondering if maybe my JSON is just not formatted correctly, but if anybody has any other ideas on how to get JSON to show up as a table I’d really appreciate it!

Thanks!

Here's my JSON output
{
    "Data":  [
                 {
                     "Queue":  "Ready",
                     "Jobs":  "10"
                 },
                 {
                     "Queue":  "Started",
                     "Jobs":  "12"
                 },
                 {
                     "Queue":  "Finished",
                     "Jobs":  "25"
                 }
             ]
}

I’ve adjusted my output to look like the JSON below, still the Table just shows the text.

[
   {
      "type":"table",
      "columns":[
         {"text":"Queue","type":"string"},
         {"text":"Jobs","type":"number"}
      ],
      "rows":[
         ["Ready","10"],
         ["Started","12"],
         ["Finished","25"]
      ]
   }
]

Hi, did you get the resolution? I’m having this same problem.

bumping this topic because we are facing a similar issue. Has anyone been able to figure out how to take JSON data from zabbix data (JSON is in the value field of the zabbix data) and convert that into a table output in grafana?

I know it’s an old post but if someone else is looking for this,
I did this using a transformation of type “Extract fields”

1 Like