Search code examples
grafanaprometheuspromql

PromQL Requests per minute


I'm trying to create a graph of total POST requests per minute in a graph, but there's this "ramp up" pattern that leads me to believe that I'm not getting the actual total of requests per minute, but getting an accumulative value.

Here is my query:

sum_over_time(django_http_responses_total_by_status_view_method_total{job="django-prod-app", method="POST", view="twitch_webhooks"}[1m])

Here are the "ramp up" patterns over 7days (drop offs indicating a reboot): enter image description here

What leads me to believe my understanding of sum_over_time() is incorrect is because the existing webhooks should always exist. At the time of the most recent reboot, we have 72k webhook subscriptions, so it doesn't make sense for the value to climb over time, it would make more sense to see a large spike at the start for catching webhooks that were not captured during downtime.

Is this query correct for what I'm trying to achieve?

I am using django-prometheus for exporting.


Solution

  • You want increase rather than sum_over_time, as this is a counter.