繁体   English   中英

为什么普罗米修斯的节点-出口商的度量值的度量类型不断增加?

[英]Why does gauge type of metric value keep increasing in node-exporter of prometheus?

这是节点导出器指标的摘要。

# HELP node_network_receive_bytes Network device statistic receive_bytes.
# TYPE node_network_receive_bytes gauge
node_network_receive_bytes{device="br-074eb8733fdc"} 4.5000969e+07
node_network_receive_bytes{device="br-d24ce0793158"} 9.8563483e+07
node_network_receive_bytes{device="docker0"} 1.81893686701e+11
node_network_receive_bytes{device="eno1"} 1.30390371207e+11
node_network_receive_bytes{device="eno2"} 2.7347435325e+10
node_network_receive_bytes{device="lo"} 9.80764398145e+11
node_network_receive_bytes{device="veth9eee40a"} 9.5458576e+07
node_network_receive_bytes{device="vethb89d9df"} 1.2443436876e+11
node_network_receive_bytes{device="vethd5ca4a4"} 648

这是说node_network_receive_bytes的类型是gauge (坦率地说,我不确定这是否是检查度量标准类型的正确方法,但直观上看起来是正确的)。

但是,当我使用range-vector检查node_network_receive_bytes时,它显示出数字不断增加,例如counter类型。

node_network_receive_bytes{device="eno1"}[3m]

    130393948462 @1516931391.405
    130394168285 @1516931401.405
    130394376002 @1516931411.405
    130394579742 @1516931421.405
    130394755152 @1516931431.405
    130394955813 @1516931441.405
    130395174828 @1516931451.405
    130395475287 @1516931461.405
    130395734293 @1516931471.405
    130395935167 @1516931481.405
    130396110667 @1516931491.405
    130396314762 @1516931501.405
    130396490334 @1516931511.405
    130396675817 @1516931521.405
    130396825764 @1516931531.405
    130397011068 @1516931541.405
    130397158242 @1516931551.405
    130397367815 @1516931561.405

另外,我下载给node-exporter Grafana仪表板使用irateincrease来查询此指标,这是我所知的counter类型指标。

// Query in grafana dashboard for node-exporter
sum(irate(node_network_receive_bytes{device=~"$device",instance=~"$node"}[3m]))
sum(increase(node_network_receive_bytes{device=~"$device",instance=~"$node"}[1m]))

增加()

增加只能与计数器一起使用。 它是rate(v)乘以指定时间范围窗口内的秒数的语法糖,应主要用于人类可读性。 记录规则中的使用率,以便在每秒的基础上持续跟踪增长情况。

愤怒的()

仅在绘制易变的快速移动计数器的图形时才使用irate。 警报和移动缓慢的计数器的使用率,因为率的短暂更改可以重置FOR子句,并且完全由罕见峰值组成的图形很难读取。

我一直很困惑,我错过了什么? node_network_transmit_bytes也出现相同的症状。)

这些实际上是计数器,在0.16.0版中将具有正确的类型和度量标准名称。

节点出口商是最古老的出口商之一,并且在建立所有准则之前就积累了一些经验。

顺便说一句,量规似乎单调增加是有效的。 使用量规,尽管您在乎其绝对值,但使用计数器仅是其增长率。

暂无
暂无

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

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