普罗米修斯度量值的重新标记

时间:2020-10-19 13:37:54

标签: monitoring prometheus grafana prometheus-alertmanager

基本上我想重新标记指标值,路径= / api / v2 / users /-/ hashes / 004fc134-93ba-4c48-b0da-e114f2245b77 / activate

/ api / v2 / users / externalhashhes / ops

我在下面尝试了此操作,但无法正常工作。 我想念什么吗?

  metric_relabel_configs:
  - source_labels: [path]
    regex: (\/api\/v2\/users\/+.\/hashes\/[0-9a-z\-]{1,40}\/\w.*)
    replacement: ‘/api/v2/users/externalhashes/ops’
    target_label: path

2 个答案:

答案 0 :(得分:1)

尝试以下操作:

::ng-deep .mat-form-field-appearance-fill .mat-form-field-flex {
    background-color: #fff; 
}

答案 1 :(得分:1)

Prometheus使用Golang re2包来解析正则表达式 https://github.com/google/re2/wiki/Syntax

快速搜寻一个测试人员,我发现了这个 https://regoio.herokuapp.com/

Marcelo的答案起作用了:+1: