Till yesterday afternoon variables are working fine in grafana with Influx as the backend data source. The query is as below
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn:(r) =>r[“_measurement”] == “measurement”)
|> keyValues(keyColumns: [“column1”])
But from yesterday evening the above query is not working. I have data in that measurement. I am using Influx 2.1 version. Can anyone help me why this is happening
Is that the query to get the variable values on Grafana? or are you using variables from Grafana in that query? .
If the intention was the second one, then I am not seeing any variable being referenced in that query.
The above query is used in grafana to get values into variable from influxdb and use it in grafana report
That might be more a question for https://community.grafana.com/ then
Now this query is working fine. I have tried diff methods and at last one method has worked. At first in the new grafana dashboard, we have to set the time range to 1 year and then create a variable.it will work. As in the variable we have start and stop range
Oh, I think I know where your confusion is coming from.
when you use |> range(start: v.timeRangeStart, stop: v.timeRangeStop) as yo do in influxdb’s data explorer.
in Grafana dashboards. it will translate both variables to the time values selected in Grafana time picker:
v.timeRangeStart and v.timeRangeStop are both variables from the time picker in both software
If you need specific time ranges either select the range using the time pickers or hard code the values like you did
Thanks for your suggestion. I tried that way by giving the date range. It is working fine now