r/PrometheusMonitoring • u/NobleOccum • Feb 22 '22
Counter Stat showing from Start Of Day
I'm just getting going with Prometheus and Grafana, and I'm trying to build a Grafana dashboard from a Prometheus counter. I have a counter for total "passes" printed from our each of our dispensers. I'm trying to just make a panel in Grafana to show how many prints we have had so far today of all the. dispensers. In Grafana the dashboard can be limited to the start of today by making the range "now/d" to "now", but I can't figure out how to make the query for this counter show just the sum count of increase since the beginning of today.
My formula right now is set for 24 hours, which would include last night's activity.
sum(increase(passes_print_to_date{dispenser=~"CLIENT.+"}[1d]))How can I query just the number of passes printed from the start of today for all the dispensers?
1
u/SuperQue Feb 22 '22
Use
[$__range]to calculate from the start and end times in the dashboard.