diff --git a/docs/configuration/configuration.md b/docs/configuration/configuration.md index 30bb07a8c1..0efded225d 100644 --- a/docs/configuration/configuration.md +++ b/docs/configuration/configuration.md @@ -3415,6 +3415,10 @@ static_configs: # List of Alertmanager relabel configurations. relabel_configs: [ - ... ] + +# List of alert relabel configurations. +alert_relabel_configs: + [ - ... ] ``` ### `` diff --git a/notifier/notifier.go b/notifier/notifier.go index 630cbdf1e5..0f93c25a35 100644 --- a/notifier/notifier.go +++ b/notifier/notifier.go @@ -383,13 +383,11 @@ func relabelAlerts(relabelConfigs []*relabel.Config, externalLabels labels.Label for _, a := range alerts { lb.Reset(a.Labels) - if externalLabels.Len() > 0 { - externalLabels.Range(func(l labels.Label) { - if a.Labels.Get(l.Name) == "" { - lb.Set(l.Name, l.Value) - } - }) - } + externalLabels.Range(func(l labels.Label) { + if a.Labels.Get(l.Name) == "" { + lb.Set(l.Name, l.Value) + } + }) keep := relabel.ProcessBuilder(lb, relabelConfigs...) if !keep {