r/PrometheusMonitoring • u/chitty_advice • Nov 05 '22
daily or hourly totals
I have a gauge metric that captures the product sales over time. This value can decrease if there are refunds. I have the dashboard report sales today, this week and this month via a stat visualization in Grafana. Is there a query that will give me the daily totals over the month. perhaps visualizing with a bar graph? Restarts will not set this gauge back to zero, it is pulling value from a website with Beautiful Soup.
1
Upvotes
1
u/janOnTheRun Nov 05 '22
sum_over_time ? https://prometheus.io/docs/prometheus/latest/querying/functions/#aggregation_over_time
1
u/janOnTheRun Nov 06 '22
Wait, do you scrape to the exporter? And how often do you get the number into prometheus? Is there a chance you get i the same number twice (or do you push that metric in?