I created the following flux (in my Grafana board) select to get the max value of “yesterday” values from a timeseries. I don’t want to use now() because this gives me only the relative results until the time now minus 1 day, so values up to midnight are missing. But I want all data from the complete day yesterday (00:00:00 until 23:59:59).
I am not familiar with that function, but in Grafana, if you are willing to save the dashboard panel (containing the max value of yesterday), you can fix the value in the time picker to “Yesterday” and it will correctly use all the values from yesterday. For example, yesterday the max temperature over 24 hours was indeed 51 F.
Yes, I know, but I want to create a panel showing data independend from the Grafana time picker. I’m using a Grafana time picker with last week, because there is a panel inside my dashboard showing the last 7 days. So I need individual time range selects in my panel InfluxDB queries.
Anyway, question to you if you know Grafana: I can solve my problem with
import “experimental/date/boundaries”
day = boundaries.yesterday()
|> range(start: day.start, stop: day.stop)
This works fine with InfluxDB Data explorer UI. But if I’m using this in Grafana InfluxDB datasource edit, I get the error
500 Internal Server Error: type error 2:1-2:38: unknown import path: “experimental/date/boundaries”
Very strange…
Obviously I’m the only person who wants to select all data of a calendary day (yesterday) from a timeseries with explicit range boundaries derived from now()