developthou
developthou

Reputation: 363

Get average rate for the last one hour in Prometheus PromQL

I am trying to get the average rate of request for the last one hour.

I am using the following query to get the rate

sum(rate(query_executes{namespace='oracle'}[1m]) by (database)

But if I were to get the average of the above rate for the last one hour, how do I do that?

Upvotes: 0

Views: 1775

Answers (1)

Rates are fundamentally averages, if you would like to calculate "average(rate(some_metric[1m])[1h])" just execute "rate(some_metric[1h])".

Upvotes: 2

Related Questions