Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Table Panel - JSON data #240

Open
evandro-portugal opened this issue Jul 14, 2016 · 15 comments
Open

[Feature Request] Table Panel - JSON data #240

evandro-portugal opened this issue Jul 14, 2016 · 15 comments

Comments

@evandro-portugal
Copy link
Contributor

Hi @alexanderzobnin , I have a question about using JSON data in table panels.
We want to store some JSONs in Zabbix and use it in table panels, but we tried to store a JSON as a text metric in Zabbix and it didn't worked at all....
I have a doubt on how to properly store this JSON in zabbix so the data source zabbix can get it and use it in a table panel (I'm presuming that since you left the JSON data option in this panel, it is possible to be used with zabbix data source)
Thanks in advance!

@alexanderzobnin
Copy link
Collaborator

I talked about this feature just yesterday in Gitter chat 😄 Table panel can show not only timeseries data, but plugin should support it. So I need to add special formatter for table panel.

@alexanderzobnin alexanderzobnin added this to the Grafana-Zabbix 3.1 milestone Jul 15, 2016
@alexanderzobnin alexanderzobnin changed the title [Question] Table Panel - JSON data [Feature Request] Table Panel - JSON data Aug 2, 2016
@alexanderzobnin
Copy link
Collaborator

@evandro-portugal Can you post example of your data?

@evandro-portugal
Copy link
Contributor Author

Hi @alexanderzobnin , sure!
We have those panels for monitoring multiples backups for each ASE database, where "início" means "start" and "fim" means "end. We use Zabbix discover to create one start and one end for each database discovered, but we would like to show (and this apply to much more information) both start and end time as a column instead of a row, having then just the database itself as a row. The only possible way is to create a JSON structure and store it in zabbix in some way (probably as a text metric).
So, we have the application BACKUP FULL and all the databases with a start time and a end time, resulting in a table panel like this:
table panel

We would like to store a JSON somewhat like this (I'm not sure about the syntax, but just as a example):

[
{
"row": "master",
"column": {
"start": {
"value": "3124121223"
},
"end": {
"value": "412321312412"
}
}
},
{
"row": "ECP",
"column": {
"start": {
"value": "3124121223"
},
"end": {
"value": "412321312412"
}
}
}
]

@y34gagarin
Copy link

Hello!

Any estimation time to see this feature in release?
Thank you!

@alexanderzobnin
Copy link
Collaborator

@y34gagarin Not sure, it requires more work than I expected. I think it's a good feature for next release.

@alexanderzobnin alexanderzobnin moved this from In Progress to Backlog in Development Flow Jun 18, 2017
@alexanderzobnin alexanderzobnin moved this from Backlog to In Progress in Development Flow Jun 18, 2017
@alexanderzobnin alexanderzobnin removed this from the Grafana-Zabbix 3.7 milestone Dec 14, 2017
@CutePotatoDev
Copy link

Hello.
Some news about this feature ?

@alexanderzobnin
Copy link
Collaborator

Unfortunately haven't time for this yet.

@leagueofsoups
Copy link

Hi!
Any news about this issues?

@havedill
Copy link

havedill commented Feb 7, 2020

+1

@wangxin688
Copy link

hope this feature coming soon

@lptarik
Copy link

lptarik commented Apr 30, 2021

Still waiting , what a shame still we don't have this future

@takai-sama
Copy link

any update for this feature?

@svdasein
Copy link

svdasein commented Dec 11, 2021

@alexanderzobnin can you explain what needs to happen for this one? Maybe (big maybe) I can help. I just ran into this - I was expecting to be able to do the equivalent of "Raw Data" with the Elasticsearch data source (which, when selected, allows all kinds of json parsing). "Table" mode doesn't really do it. If you could explain what needs to happen maybe I can help?

Where this becomes important is in situations where people are using the so called "synthetic" monitoring features they've been continuing to enhance in zabbix. So e.g. you can do a http agent based item that queries an api which returns a json document. You can then create all kinds of dependent items based on that json. So by itself that json document isn't super useful for monitoring, but once you make dependent items based on it - you've saved a lot of hassle and polling overhead.

So the thing is - you're sitting there with that json document - it's a snapshot in time of something. Sometimes it'd be nice to be able to render that snapshot as a table in grafana with the "Table" or "DataTable" panels. Right now it does not seem possible to have the zabbix datasource provide this raw json to the panel's logic.

The elasticsearch datasource is an example of something that works properly for this - you can choose to render a "metric" to the panel as "Raw Data" like this:
image
And once you've done that, if the panel you're using has logic for it it'll let you pull that document apart and make columns out of it etc.

At the api level, an elasticsearch query naturally returns json as a result - so in the case of that data source, it's really a question of essentially doing nothing to the database query result - just passing that to the panel.

I think it'd be something like a permutation on the notion of "last()" where the metric is passed to the panel as a string. When you select that raw data thing in elasticsearch the first thing that happens is that you see a single column called "raw" appear. Once that happens all the panel magic to parse the json becomes active.

Is it possible you think to do some sort of similar "pass through" thing w/ your datasource?

@iBelow
Copy link

iBelow commented Feb 24, 2022

its in dev now?

@khumps
Copy link

khumps commented Dec 8, 2022

Just found this issue after wanting to render a JSON blob from Zabbix as a table. Has there been any progress on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development Flow
  
In Progress
Development

No branches or pull requests