Get Total requests in a period of time

前端 未结 7 923
予麋鹿
予麋鹿 2020-12-08 00:02

I need to show, in Grafana, a panel with the number of requests in the period of time selected in the upper right corner.

For this I need to solve 2 issues here, I w

7条回答
  •  忘掉有多难
    2020-12-08 00:40

    SO won't let me comment on Yoory's answer so I have to make a new one...

    In Grafana 5.3, they introduced $__range for Prometheus that's easier to use:

    sum(rate(http_requests_total[$__range]))
    

    This variable represents the range for the current dashboard. It is calculated by to - from

    http://docs.grafana.org/features/datasources/prometheus/

提交回复
热议问题