[英]How can i get save metric per second on prometheus?
对于k8s v1.8和Prometheus v2.2.1
我想知道 Prometheus 每秒存储的指标数量
我如何提取该信息?
Prometheus 在 prometheus 实例的/metrics
路径中公开度量prometheus_tsdb_head_samples_appended_total
。 此计数器表示Total number of appended samples
的Total number of appended samples
。
然后您可以使用 if 来计算摄取率:
rate(prometheus_tsdb_head_samples_appended_total[1m])
这实际上是 Prometheus 从最后一分钟获取的每秒存储的指标数量。
如果要对每秒指标的瞬时数量进行采样,也可以改用irate() 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.