I am using template variable queries to assign a variable in Grafana.
SELECT * FROM jmeter WHERE application =~ /$tag_left/ ORDER BY time asc LIMIT 1
Result JSON of this query is
{"results":[{"series":[{"name":"jmeter","columns":["time","application","avg","count","countError","endedT","hit","max","maxAT","meanAT","min","minAT","pct90.0","pct95.0","pct99.0","rb","responseCode","responseMessage","sb","startedT","statut","transaction"],"values":[[1595241959625,"demo_scenario.jmx @ 1 @ Mon Jul 20 16:15:58 IST 2020",null,null,null,0,null,null,0,0,null,0,null,null,null,null,null,null,null,0,null,"internal"]]}]}]}
I need to get time from this query. Which is coming in version 5.0 of grafana but not coming in 7.0 version.
Is there any way in which I can select the respective column like time
from the query result and assign it to variable ? something like ${var:index}
I am attaching the screenshot for more clarity on this.
As you can see, one is showing timestamp
as variable value (e.g. 1595228080029), and another one is showing application
value (e.g. demo_scenario.jmx @ 1 @ Mon Jul 20 16:15:58 IST 2020
) under Preview of values section as a result of query
Underlining data source is InfluxDB. And in both the cases api query has same response.