|
|
@ -475,10 +475,6 @@ func (n *Manager) sendAll(alerts ...*Alert) bool { |
|
|
|
numSuccess atomic.Uint64 |
|
|
|
numSuccess atomic.Uint64 |
|
|
|
) |
|
|
|
) |
|
|
|
for _, ams := range amSets { |
|
|
|
for _, ams := range amSets { |
|
|
|
if len(ams.ams) == 0 { |
|
|
|
|
|
|
|
continue |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var ( |
|
|
|
var ( |
|
|
|
payload []byte |
|
|
|
payload []byte |
|
|
|
err error |
|
|
|
err error |
|
|
@ -487,6 +483,10 @@ func (n *Manager) sendAll(alerts ...*Alert) bool { |
|
|
|
|
|
|
|
|
|
|
|
ams.mtx.RLock() |
|
|
|
ams.mtx.RLock() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if len(ams.ams) == 0 { |
|
|
|
|
|
|
|
ams.mtx.RUnlock() |
|
|
|
|
|
|
|
continue |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if len(ams.cfg.AlertRelabelConfigs) > 0 { |
|
|
|
if len(ams.cfg.AlertRelabelConfigs) > 0 { |
|
|
|
amAlerts = relabelAlerts(ams.cfg.AlertRelabelConfigs, labels.Labels{}, alerts) |
|
|
|
amAlerts = relabelAlerts(ams.cfg.AlertRelabelConfigs, labels.Labels{}, alerts) |
|
|
|