LastResetTime-to-Now Dashboard Interval, is it possible?

I have a separate field (LastResetTime) in my influxdb that contains a timestamp.

I wish to use this time as an absolute From-time in my dashboard. And I wish to use Now as the To-time. And this should update every ‘Refresh Every x’ that is selected.

And whenever the LastResetTime changes, I want my dashboard to reflect this automatically.

Is this possible to do in Grafana? And if so, how?

(I am fairly new to Grafana)


Hi @alfalfa I do not think this is possible right now. Time range input accepts only literal time values or relative time strings like now-1h and it is not possible to set it from a query.

You could change your queries to return only the values you want (using subquery for the range) but that would not sync it with the selected range in the dashboard so the range your query returns and what graphs show in dashboard would be different creating either gaps or not showing all the data.

Ok thanks @aocenas

I was hoping it was possible to use Variables or something similar.

So it is not possible to do even using variables and associated dropdown menu where i can select the from-time (reset point) manually?

Yeah I also thought that could be way to go, but variable interpolation is not done on every text field, just some, and looking at the code and trying it directly it seems none of those refresh fields handle variables. Same for the dashboard settings where you can change what refresh intervals will be shown in the refresh dropdown.

Thanks again.

Then i hereby officially have a feature request:

Query-enable dashboard From-time

Query-enable dashboard To-time

Query-enable dashboard Refresh Interval