VictoriaMetrics/app/vmalert/notifier/testdata/consul.good.yaml
hagen1778 ed364a42e3 vmalert: support relabeling for alert labels sent via notifier
Before, relabeling for notifier configured via file was supported
only for target labels discovered via SD.
With this change, new config field `alert_relabel_configs` is introduced
for applying relabeling to labels of sent alerts.

Signed-off-by: hagen1778 <roman@victoriametrics.com>
2022-04-11 11:09:14 +03:00

16 lines
369 B
YAML

consul_sd_configs:
- server: localhost:8500
scheme: http
services:
- alertmanager
- server: localhost:8500
services:
- consul
relabel_configs:
- source_labels: [__meta_consul_tags]
regex: .*,__scheme__=([^,]+),.*
replacement: '${1}'
target_label: __scheme__
alert_relabel_configs:
- target_label: "foo"
replacement: "aaa"