Grafana simplejson dashboard is the link for a graph panel that uses json Data source. I followed the steps and it works perfectly for me. However, I’m unable to project my own json data on to Grafana panels if I want other types of visualizations. I’m fairly new to this, and don’t understand what the index file in the original post is really doing. I’d appreciate it if someone could push me in the right direction.
I had a CSV table, which I converted into JSON format. I wish to project the contents of my data in different forms of visualizations. Is there any link to this? Thank you.
If it works for the Graph panel then it should for almost every other visualization.
We have an intro to time series which might help you understand the concept better.
If the data is in the time series format (or the table format for panels like the Table panel) then it can visualized in Grafana.
what if the data is non-time series? what if I just want to project a table/single stats panel/pie chart of given data in JSON
for. eg.
John - 4,
Tim - 2
George - 5
A table of these 3 attributes and their values.
That is not time series data (for showing trends over time) which is Grafana’s strong point. There is some support for tabular data and there will be more support for it in future releases. In the current version of Grafana there are some panels that work with tabular data:
- table panel
- Bar gauge
- Stat panel
- Gauge panel
As well as some external community plugins like:
- Worldmap
- Piechart
- Datatable panel
That’s what I meant to ask. How do I configure my index file to send non-time series JSON data to Grafana to be projected in Stat/Bar/Gauge panels. How would Grafana know my metrics or my data points(values) in that case?
I’ve tried and implemented all the above visualizations you mentioned, using non time-series SQL data source with no issues. I converted my same csv’s to JSON format because that’s my ultimate goal. To show various visualizations of non-time series JSON data. ( I already achieved the time series data source part)
Is there any work been done on this that I could refer to?
There are two ways to return tabular data - the current way that most plugins are using and the new data frame concept that is coming in 7.0 (so that’s quite bleeding edge).
Angular panels
The format is documented here: https://grafana.com/docs/grafana/latest/plugins/developing/datasources/#query
You need to specify type to be table
and have arrays for columns and rows.
Data Frames
Here is an example of how to create a data source in React using the data frames concept:
and here is an explanation (docs still being written): https://grafana.com/tutorials/build-a-panel-plugin/#6