简体   繁体   English

Grafana/Prometheus/VictoriaMetrics 中的集成和时间段

[英]integrate and time period in Grafana/Prometheus/VictoriaMetrics

I'm trying to use the integrate function in Prometheus using functional victoria_metrics to control the time period via the functionality Grafana (in the upper right corner of the page).我正在尝试在 Prometheus 中使用集成 function 使用功能 victoria_metrics 通过 Grafana 功能(在页面的右上角)控制时间段。 But this control is not working.但是这种控制不起作用。 To calculate the total amount of traffic (total byte), I have to use variable "interval": 5m, 15m, 30m, 1h, 3h, 6h... 1 day, 2 days, a week, etc. to display information on the dashboard about the amount of traffic for the required period.要计算总流量(总字节),我必须使用变量“间隔”:5m、15m、30m、1h、3h、6h... 1 天、2 天、一周等来显示信息关于所需时间段的流量的仪表板。

As a result, I have to use the selection of the time period in Grafana to setup needed time period, for example: 07/20/2020 - 07/26/2020 (7 days) and additionall I'm using my variable: 7 days.因此,我必须使用 Grafana 中的时间段选择来设置所需的时间段,例如:07/20/2020 - 07/26/2020(7 天),另外我正在使用我的变量:7天。

It's so awkward.. How to use only Grafana interface?好尴尬。。如何只使用Grafana界面? For bandwidth graphs this works.对于带宽图,这是可行的。

My query:我的查询:

integrate(outbound{location="city1"}[$timeframe])/8/(1024^3)

Raw data comes in gbit/sec.原始数据以 gbit/sec 为单位。 Bandwidth metric of network interface works with query网络接口的带宽度量与查询一起使用

outbound{location="city1"}

Try substituting [$timeframe] with [$__range] in the query.尝试在查询中将[$timeframe]替换为[$__range] The $__range is a special Grafana variable that equals to the selected time period. $__range是一个特殊的 Grafana 变量,等于所选时间段。 See the docs about $__range variable for more details.有关更多详细信息,请参阅有关 $__range 变量的文档

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

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