mirror of
https://github.com/grafana/grafana.git
synced 2024-11-23 01:16:31 -06:00
alertmanager: if there are no alerts to send, do nothing
This commit is contained in:
parent
eef01e3703
commit
777c1024c9
@ -78,6 +78,10 @@ func (this *AlertmanagerNotifier) Notify(evalContext *alerting.EvalContext) erro
|
||||
alerts = append(alerts, alertJSON)
|
||||
}
|
||||
|
||||
if len(alerts) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
bodyJSON := simplejson.NewFromAny(alerts)
|
||||
body, _ := bodyJSON.MarshalJSON()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user