我怎样才能在普罗米修斯上获得每秒的保存指标?
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
.
然后您可以使用 if 来计算摄入率:
rate(prometheus_tsdb_head_samples_appended_total[1m])
这是 Prometheus 从最后一分钟开始存储的每秒有效指标数。
如果要采样瞬时每秒的指标数,也可以用irate()代替。
对于 k8s v1.8 和 Prometheus v2.2.1
我想知道 Prometheus 每秒存储的指标数
我如何提取该信息?
Prometheus 在您的 prometheus 实例的 /metrics
路径中公开指标 prometheus_tsdb_head_samples_appended_total
。此计数器代表 Total number of appended samples
.
然后您可以使用 if 来计算摄入率:
rate(prometheus_tsdb_head_samples_appended_total[1m])
这是 Prometheus 从最后一分钟开始存储的每秒有效指标数。
如果要采样瞬时每秒的指标数,也可以用irate()代替。