-
What Grafana version and what operating system are you using?
Grafana v9.5.2 on Ubuntu -
What are you trying to achieve?
I have a Zabbix that collects a metric in CSV and convert it to JSON, this is working fine. I want to reproduce this visualization on Grafana on the Table panel, so each JSON object has to be in different line, one below another. -
How are you trying to achieve it?
I created a dashboard, added my zabbix query and selected the Table panel. Then, I use “Transform” on panel and added “Extract Fields”, selected my metric name and put Format as “Key+value+pairs” and enable option “Replace All Fields”. -
What happened?
it shows me only the last line of the JSON response, instead of 8 lines.
My JSON is:
[{
“JOB_NAME”: “B”,
“LOG_DATE”: “2023-08-09 01:17:51”,
“OPERATION”: “RUN”,
“STATUS”: “FAILED”
}, {
“X”: “A”,
“DATE”: “2023-07-13 03:59:14”,
“OPERATION”: “RUN”,
“STATUS”: “FAILED”
}, {
“X”: “B”,
“DATE”: “2023-07-13 01:28:14”,
“OPERATION”: “RUN”,
“STATUS”: “FAILED”
}, {
“X”: “A”,
“DATE”: “2023-07-12 04:01:31”,
“OPERATION”: “RUN”,
“STATUS”: “FAILED”
}, {
“X”: “B”,
“DATE”: “2023-07-12 01:22:02”,
“OPERATION”: “RUN”,
“STATUS”: “FAILED”
}, {
“X”: “A”,
“DATE”: “2023-07-11 01:49:28”,
“OPERATION”: “RUN”,
“STATUS”: “FAILED”
}, {
“X”: “B”,
“DATE”: “2023-07-10 22:26:17”,
“OPERATION”: “RUN”,
“STATUS”: “FAILED”
}, {
“X”: “A”,
“DATE”: “2023-07-10 01:40:24”,
“OPERATION”: “RUN”,
“STATUS”: “SUCCEEDED”
}]
Zabbix execute this only once a day and Grafana dashboard time range panel is 1 day, Table panel is showing only the LAST line of JSON, so now I have a panel with just one line, instead of the 8 lines of the JSON. My Grafana table is showing:
X": “A” | “DATE”: “2023-07-10 01:40:24” | “OPERATION”: “RUN” | “STATUS”: “SUCCEEDED”
Why it’s retrieving just the last line of JSON response? On Zabbix, everything is OK and I have my entire JSON.