Search code examples
grafanainfluxdbgrafana-variable

Grafana dashboard using start: ${__from}, stop: ${__to} stopped working


I have a dashboard in grafana (v 8.4.4) that uses InfluxDB with Flux query which looks something like this:

from(bucket: "landscape_sizing")
|> range(start: ${__from}, stop: ${__to})
|> filter(fn: (r) => r["_measurement"] == "old_snapshots")

If I select some range like Last 7 days or Last 90 days, I get no data in the dashboard. If I select absolute time rage and though with fixed dates/time data shows up. The fun part is this query used to work for a while, and as far as I'm aware there were no major changes on either Grafana or Influx side. Is there a way to check what the __from and __to variables in the query are interpred to?


Solution

  • You should be able to see that in Grafana, from the visual Inspect -> Query. that should show you the actual query text