prometheus - 将多个指标与唯一标签进行比较时,指标不匹配
问题描述
我有 2 个指标,例如:
metric1{lable1="a",label2,...}
metric1{lable1="b",label2,...}
metric2{lable1="a",label2,...}
预期结果:
metric1{label1="b"}
metric2
因为不存在匹配的标签。
上述预期结果的 PromQL 是什么?
解决方案
metric1 unless metric2
?
或者,如果您只想匹配标签子集,metric1 unless on(label1, label2) metric2
.
推荐阅读
- python - 在python中按索引切片嵌套列表
- git - 如何从特定提交中提取所有内容?
- c# - 如何通过速记或作为变量引用一个类?
- python - 如何通过将另一列乘以常数来在数据框中创建新列?
- assembly - 我做了一个循环,现在我想在汇编中总结我的结果
- django - 如何从项目 urls.py 中包含的应用程序中为“其他”URLconfs 生成 swagger 文档
- c# - UnitsNet:将值呈现为具有单位全名的字符串?
- php - 基于 PHP 的应用程序中的在线和离线数据库之间的同步
- sorting - 将 Google 表格链接到 Google 表单自动按日期排序
- azureservicebus - 在 Microsoft.ServiceBus.Messaging.TopicClient 中设置 OperationTimeout