Search code examples
prometheusistiopromql

How to calculate requests per minute using Istio Prometheus metrics?


I want to calculate requests per minute, aggregated by service name.

I'm using the following query but I'm not sure if it is correct.

sum(increase(istio_requests_total{destination_workload_namespace="falabella"}[1m])) by (destination_workload) 

Solution

  • It looks correct. Another query would be:

    60 * sum(rate(istio_requests_total{destination_workload_namespace="falabella"}[1m])) by (destination_workload)
    

    As documented, they are equivalent: https://prometheus.io/docs/prometheus/latest/querying/functions/#increase