从普罗米修斯(Prometheus)中添加格拉法纳(grafana)中的不同度量

raj*_*ree 2 grafana prometheus

我在prometheus中有不同的指标counter_metrics acouneter_metrices b并且我想要一个singlestat来统计所有不同的请求指标。

我该如何获取?

(sum(couneter_metrics{instance="a,job="b"}))+
Run Code Online (Sandbox Code Playgroud)

Dan*_*Lee 5

对于singlestat面板,您可以将两个指标求和,然后将它们加在一起。这是具有两个不同指标的示例:

sum(prometheus_local_storage_memory_series) + sum(counters_logins)

推荐阅读,以防万一您也要对速率进行任何操作:https : //www.robustperception.io/rate-then-sum-never-sum-then-rate/