metric_relabel_configs: 如果标签变得不唯一会怎样?
metric_relabel_configs: What happens if labels become non-unique?
在几篇文章中,我发现了关于 metric_relabels_config
:
的类似内容
Note, with label dropping you need to ensure that the final metrics after label drop are still uniquely labeled and not resulting in duplicate time-series with different values.
但是,如果 action
导致时间序列的标签组合已经存在,会发生什么?
用例:使用重新标记将带有 return 代码(例如 404
和 403
的 http 时间序列移动到 4xx
等等。这是否正常工作(将值相加)或者 Prometheus 会输入 "undefined state"?
时间序列会发生冲突,不会全部被摄取。这不是你想要的。
Does this work correctly (adding up the values)
对于添加,您首先需要 Prometheus 的 TSDB 中的数据,因为只有 PromQL 才能进行聚合。
在几篇文章中,我发现了关于 metric_relabels_config
:
Note, with label dropping you need to ensure that the final metrics after label drop are still uniquely labeled and not resulting in duplicate time-series with different values.
但是,如果 action
导致时间序列的标签组合已经存在,会发生什么?
用例:使用重新标记将带有 return 代码(例如 404
和 403
的 http 时间序列移动到 4xx
等等。这是否正常工作(将值相加)或者 Prometheus 会输入 "undefined state"?
时间序列会发生冲突,不会全部被摄取。这不是你想要的。
Does this work correctly (adding up the values)
对于添加,您首先需要 Prometheus 的 TSDB 中的数据,因为只有 PromQL 才能进行聚合。