I’m running Grafana on a Linux OS
The goal is to use a JSON to pass data to a variable.
This variable will be used to modify (filter, visualisation name, timerange, …) a dynamic dashboard.
The variable is created on the dasboardsettings as ‘query’, and is named “testvar”.
I have the following example data, as inline data for the infinity datasource
[
{
"entity":"GOOGL",
"price": 2155.85,
"time": 1653603843766
},
{
"entity":"AAPL",
"price": 143.78,
"time":1653603943766
}
]
In parsing options, I have defined the columns:
entity, price, time.
On the dashboard I want to (for example) visualize the value of the entity.
This works as I enter ${testvar}
, “GOOGL” or “AAPL” is returned depending on the selection in the dashboard.
However I also want to visualize the price and time.
I’ve tried ${testvar:price}
but this only works when there are 2 columns defined.
When I define a third column, everything returns the same value, no matter what I try.
Bottom line: I want to have a dropdown box that is populated with the “entity” of the json, and use the referencing data “price” and “time” in the dashboard.
for example: ${testvar.price}
and ${testvar.time}
Kind regards