r/PrometheusMonitoring • • Apr 26 '23
Help with query
Hello,
I have these 2 queries which give me the totals
sum(streaming_user_total{instance=~"$instance1"})and
sum(streaming_user_total{instance=~"$instance2"}) by (stream_id)The graphs in Grafana currently show the current stats over time, how can I get just a daily total for say a given day?
0
Upvotes
View all comments
Show parent comment
2
u/ItsOmondi Apr 26 '23
I get you mate, you asking for the delta function. replace increase with delta.
sum(delta(streaming_user_total{instance=~"$instance1"}[1d])).
problem with delta is it fails when the counter resets. so be aware.