grafana-zabbix icon indicating copy to clipboard operation
grafana-zabbix copied to clipboard

[Feature Request] Table Panel - JSON data

Open evandro-portugal opened this issue 8 years ago • 14 comments

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!

evandro-portugal avatar Jul 14 '16 22:07 evandro-portugal

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 avatar Jul 15 '16 13:07 alexanderzobnin

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

alexanderzobnin avatar Aug 02 '16 17:08 alexanderzobnin

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" } } } ]

evandro-portugal avatar Aug 02 '16 20:08 evandro-portugal

Hello!

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

y34gagarin avatar Jun 12 '17 10:06 y34gagarin

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

alexanderzobnin avatar Jun 15 '17 18:06 alexanderzobnin

Hello. Some news about this feature ?

CutePotatoDev avatar May 07 '18 12:05 CutePotatoDev

Unfortunately haven't time for this yet.

alexanderzobnin avatar May 07 '18 17:05 alexanderzobnin

Hi! Any news about this issues?

leagueofsoups avatar Aug 22 '19 16:08 leagueofsoups

+1

havedill avatar Feb 07 '20 19:02 havedill

hope this feature coming soon

wangxin688 avatar May 18 '20 12:05 wangxin688

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

lptarik avatar Apr 30 '21 08:04 lptarik

any update for this feature?

takai-sama avatar Nov 04 '21 10:11 takai-sama

@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?

svdasein avatar Dec 11 '21 19:12 svdasein

its in dev now?

iBelow avatar Feb 24 '22 20:02 iBelow

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

khumps avatar Dec 08 '22 21:12 khumps