简体   繁体   English

Prometheus - 给定时间段内的多个平均 HTTP 请求率

[英]Prometheus - Multiple average HTTP request rate over a given period

I have an HTTP API for which I need to find:我有一个 HTTP API 我需要找到它:

  1. Average number of requests per second during the last N days过去 N 天平均每秒请求数
  2. Average number of requests per hour during the last N days过去 N 天平均每小时的请求数
  3. Average number of requests per day during the last N days过去 N 天平均每天的请求数

Is rate(http_requests_total[Nd]) the right and best answer to 1? rate(http_requests_total[Nd])是 1 的正确和最佳答案吗? And if so, for 2 and 3, is it enough to multiple by 60x60 and 60x60x24,respectively?如果是这样,对于 2 和 3,分别乘以 60x60 和 60x60x24 是否足够?

is it enough to multiple by 60x60 and 60x60x24,respectively?分别乘以 60x60 和 60x60x24 是否足够?

Yes, using rate and then multiplying is the way to do this.是的,使用rate然后相乘是做到这一点的方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM