我要转换以下指标
time__2xx_count{instance="localhost:9991",job="finagle_exporter",original_key="time/2XX.count"}
到
time__2xx_count{instance="localhost:9991",job="finagle_exporter",status="2XX",type="count"}
我想从original_key source_label中提取状态和指标类型。我尝试了以下操作,但不起作用
relabel_configs:
- source_labels: [original_key]
regex: 'time\/(.*)\.(.*)'
replacement: '$1'
target_label: status
- source_labels: [original_key]
regex: 'time\/(.*)\.(.*)'
replacement: '$2'
target_label: type
答案 0 :(得分:0)
我会尝试以下操作:
finish()