Prometheus Querying Function rate() vs irate()
rate()
rate(v range-vector) calculates the per-second average rate of increase of the time series in the range vector.
rate()函数计算某个时间序列范围内的每秒平均增长率。
Breaks in monotonicity (such as counter resets due to target restarts) are automatically adjusted for.
自适应单调性中断(比如target重启导致的计数器重置)。
Also, the calculation extrapolates to the ends of the time range, allowing for missed scrapes or imperfect alignment of scrape cycles with the range's time period.
计算结果是推算到每个时间范围的最后而得出,允许漏抓和抓取周期与时间范围的不完美结合。
The following example expression returns the per-second rate of HTTP requests as measured over the last 5 minutes, per time series in the range vector:
以下示例返回最后五分钟HTTP请求每秒增长率
rate(http_requests_total{job="api-server"}[5m])
rate should only be used with counters. It is best suited for alerting, and for graphing of slow-moving counters.
rate应该只和计数器一起使用。最适合告警和缓慢计数器的绘图。
Note that when combining rate() with an aggregation operator (e.g. sum()) or a function aggregating over time (any function ending in _over_time), always take a rate() first, then aggregate. Otherwise rate() cannot detect counter resets when your target restarts.
irate()
irate(v range-vector) calculates the per-second instant rate of increase of the time series in the range vector.
irate()函数计算一段时间范围内某个时刻的每秒增长率
This is based on the last two data points. Breaks in monotonicity (such as counter resets due to target restarts) are automatically adjusted for.
基于最后两个数据点进行计算。自适应单调性中断(比如target重启导致的计数器重置)。
The following example expression returns the per-second rate of HTTP requests looking up to 5 minutes back for the two most recent data points, per time series in the range vector:
以下示例返回五分钟内最近两次数据点的HTTP请求每秒增长率
irate(http_requests_total{job="api-server"}[5m])
irate should only be used when graphing volatile, fast-moving counters. Use rate for alerts and slow-moving counters,
rate应该只和快速的、不稳定的计数器一起使用。
as brief changes in the rate can reset the FOR clause and graphs consisting entirely of rare spikes are hard to read.
因为比率短暂的改变可以充值FOR语句,而且一个包含极少的峰(突然上升)的图是很难阅读的。
Note that when combining irate() with an aggregation operator (e.g. sum()) or a function aggregating over time (any function ending in _over_time), always take a irate() first, then aggregate.
Otherwise irate() cannot detect counter resets when your target restarts.
Prometheus Querying Function rate() vs irate()的更多相关文章
- Prometheus的监控解决方案(含监控kubernetes)
prometheus的简介和安装 Prometheus(普罗米修斯)是一个开源系统监控和警报工具,最初是在SoundCloud建立的.自2012年成立以来,许多公司和组织都采用了普罗米修斯,该项目拥有 ...
- prometheus杂碎
一个监控及告警的系统,内含一个TSDB(时序数据库).在我而言是一个数采程序 重要成员分三块 exploter:实际是外部接口,让各个程序实现这个接口,供普罗米修斯定时从此接口中取数 alert:告警 ...
- openresty(完整版)Lua拦截请求与响应信息日志收集及基于cjson和redis动态路径以及Prometheus监控(转)
直接上文件 nginx.conf #运行用户和组,缺省为nobody,若改为别的用户和组,则需要先创建用户和组 #user wls81 wls; #开启进程数,一般与CPU核数等同 worker_pr ...
- 【PromQL】prometheus查询语言
常用查询: https://songjiayang.gitbooks.io/prometheus/content/exporter/nodeexporter_query.html group by 操 ...
- 实战 Prometheus 搭建监控系统
实战 Prometheus 搭建监控系统 Prometheus 是一款基于时序数据库的开源监控告警系统,说起 Prometheus 则不得不提 SoundCloud,这是一个在线音乐分享的平台,类似于 ...
- Prometheus 后续杂记
在后续prometheus的使用中遇到的一些问题我会在此记录 搭建初期几个问题 rule.yml中对每条告警加上主机名? 要在告警通知中加上故障机器主机名不能从prometheus的采集监控项数据中的 ...
- Prometheus 与 Grafana 集成
简介 Grafana 是一个可视化仪表盘,它拥有美观的图标和布局展示,功能齐全的仪表盘和图形编辑器,默认支持 CloudWatch.Graphite.Elasticsearch.InfluxDB.My ...
- PromQL
PromQL (Prometheus Query Language) 是 Prometheus 自己开发的数据查询 DSL 语言,语言表现力非常丰富,内置函数很多,在日常数据可视化以及rule 告警中 ...
- YprogressBar,html5进度条样式,js进度条插件
简介 YprogressBar是一款基于HTML5的进度条插件. YprogressBar是一款轻量级进度条插件,使用方便,资源占用少,模仿好压的解压界面,带有数字显示,同时支持在描述中增加参数,以动 ...
随机推荐
- HDU6740 2019CCPC秦皇岛赛区 J. MUV LUV EXTRA
题目:http://acm.hdu.edu.cn/showproblem.php?pid=6740思路:求小数部分后k位的真前后缀 倒着kmp就好 #include<bits/stdc++.h& ...
- 编程语言类别;运行Python程序的方式;变量和常量;Python程序的垃圾回收机制;
目录 编程语言分类 运行Python程序的两种方式 1.交互式 变量与常量 1.变量 2.常量 3.小整数池 垃圾回收机制 编程语言分类 编程语言分为: 1.机器语言:直接用二进制的0和1和计算机(C ...
- C# 扩展方法——mysql-dapper(MySqlMapperExtensions)
其他扩展方法详见:https://www.cnblogs.com/zhuanjiao/p/12060937.html 反射比较耗费性能,反射得到属性进行缓存 根据反射得到的属性,进行动态拼接sql语句 ...
- Windows环境下MySQL面试技巧
对话一: 面试官:重新安装mysql卡在最后一步,怎么解决? 应聘者:第一次安装完mysql,由于各种原因需要重新安装是经常遇到的问题,解决方案如下. 1)在注册表里搜索my ...
- [深度学习] pytorch学习笔记(2)(梯度、梯度下降、凸函数、鞍点、激活函数、Loss函数、交叉熵、Mnist分类实现、GPU)
一.梯度 导数是对某个自变量求导,得到一个标量. 偏微分是在多元函数中对某一个自变量求偏导(将其他自变量看成常数). 梯度指对所有自变量分别求偏导,然后组合成一个向量,所以梯度是向量,有方向和大小. ...
- 1143, 3997: Dilworth定理的简单应用
偏序集上的最小链覆盖等于最长反链 于是两道题 1143: [CTSC2008]祭祀river 求偏序集上的最长反链 转换成偏序集上的最小链覆盖 求个闭包,转换成最小路径覆盖,二分图匹配一发 #incl ...
- MySQL数据库入门———常用基础命令
mysql 连接数据库命令: MySQL 连接本地数据库,用户名为“root”,密码“123”(注意:“-p”和“123” 之间不能有空格) mysql -h localhost -u root -p ...
- [VIJOS2055][SDOI2019]移动金币:DP+组合数学
分析 显然可以转化为阶梯nim. 于是问题转化为了对于所有\(i \in [0,n-m]\),求长度为\(\lfloor\frac{m+1}{2}\rfloor\),和为\(i\),异或和非\(0\) ...
- kali VMWOOLS的安装
别人的教程 https://jingyan.baidu.com/article/3ea51489992f1f52e71bba45.html
- 从setContentView()源码看起
2.1 Activity::setContentView() public void setContentView(@LayoutRes int layoutResID) { getWindow(). ...