Hi,

In our application we have a counter that represents something like "total 
consumption of budget".
And we also have a "limit on daily consumption of the budget".
So we want to monitor (in our prometheus & grafana) increase of the budget 
within each day (i.e., we want the resulting time series to be reset at 
00:00 every day) but so far with no luck.
How can we achieve that in PromQL?

IIUC range vectors with 24h range does not have an idea of "date".
What I came up with was to construct a 0-1 time series (e.g. 
`floor((vector(time()) + 9 * 3600) / 86400) == bool 18331`) and multiply 
the vectors to extract "today's data points", but I have no idea how to 
obtain the current date as a fixed scalar value (`18331` in the example).

We hope there's a cleaner/smarter solution. Any suggestions are welcomed!

Shunsuke Kirino

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prometheus-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/c4e9bfa2-7efa-4762-b609-2e4e1c259ed7%40googlegroups.com.

Reply via email to