How to use the selected period of time in a query?

后端 未结 2 1930
天命终不由人
天命终不由人 2021-01-30 23:51

I\'m using Grafana with Prometheus and I\'d like to build a query that depends on the selected period of time selected in the upper right corner of the screen.

Is there

2条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-31 00:23

    If you are looking at using prometheus as data source, $__range supports your dashboard time is great.

     increase(gin_total_requests[$__range])
    

    Why create your variable when you can use inbuilt Global variable.

    I have added links to documentations to back up my answer Grafan 5.3+

提交回复
热议问题