Grafana 使用 Prometheus 做数据源时,当在 Prometheus 中把 Labels 从 instance="10.1.0.176" service="prod"
更换为 instance="10.1.0.176" service="Linux"
后,
Grafana Singlestat 图表出现
Multiple Series Error
错误原因是 Grafana Singlestat 只支持 1 个输出值,而 node_memory_MemTotal_bytes{instance=~"$node"}
查询会同时取到
node_memory_MemTotal_bytes{instance=~"$node",job="Linux Host",service="Linux"}
和 node_memory_MemTotal_bytes{instance=~"$node",job="Linux Host",service="prod"}
的值,所以会出现错误
解决办法:
指定只获取 node_memory_MemTotal_bytes{instance=~"$node",job="Linux Host",service="Linux"}
的值,就正常了
网友评论