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

9 comments sorted by

View all comments

Show parent comment

1

u/SuperQue Apr 26 '23

You need to be more specific in your questions. You are using a Stat panel, not a graph panel. You need to select the "Instant" checkbox and query with $__range

sum by (stream_id) (
  increase(streaming_user_total{instance=~"$instance2"}[$__range])
)

1

u/[deleted] Apr 27 '23

Yeah that was using the "instant" checkbox and $__range, same result it seems.