grafana-zabbix
grafana-zabbix copied to clipboard
[Feature Request] Table Panel - JSON data
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!
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.
@evandro-portugal Can you post example of your data?
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:
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" } } } ]
Hello!
Any estimation time to see this feature in release? Thank you!
@y34gagarin Not sure, it requires more work than I expected. I think it's a good feature for next release.
Hello. Some news about this feature ?
Unfortunately haven't time for this yet.
Hi! Any news about this issues?
+1
hope this feature coming soon
Still waiting , what a shame still we don't have this future
any update for this feature?
@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:
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?
its in dev now?
Just found this issue after wanting to render a JSON blob from Zabbix as a table. Has there been any progress on this?