mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-26 06:04:05 -08:00
skip empty alerts. (#6444)
Signed-off-by: johncming <johncming@yahoo.com>
This commit is contained in:
parent
e53f751765
commit
83cda784d2
|
@ -457,6 +457,10 @@ func (n *Manager) DroppedAlertmanagers() []*url.URL {
|
||||||
// sendAll sends the alerts to all configured Alertmanagers concurrently.
|
// sendAll sends the alerts to all configured Alertmanagers concurrently.
|
||||||
// It returns true if the alerts could be sent successfully to at least one Alertmanager.
|
// It returns true if the alerts could be sent successfully to at least one Alertmanager.
|
||||||
func (n *Manager) sendAll(alerts ...*Alert) bool {
|
func (n *Manager) sendAll(alerts ...*Alert) bool {
|
||||||
|
if len(alerts) == 0 {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
begin := time.Now()
|
begin := time.Now()
|
||||||
|
|
||||||
// v1Payload and v2Payload represent 'alerts' marshaled for Alertmanager API
|
// v1Payload and v2Payload represent 'alerts' marshaled for Alertmanager API
|
||||||
|
|
Loading…
Reference in a new issue