Drop notifications when no alert manager URL is configured.

pull/342/head
Julius Volz 11 years ago committed by Julius Volz
parent e969562b13
commit 24f4bb1f07

@ -98,6 +98,9 @@ func (n *NotificationHandler) sendNotifications(reqs rules.NotificationReqs) err
// Continusouly dispatch notifications.
func (n *NotificationHandler) Run() {
for reqs := range n.pendingNotifications {
if n.alertmanagerUrl == "" {
log.Println("No alert manager configured, not dispatching notification")
}
if err := n.sendNotifications(reqs); err != nil {
log.Println("Error sending notification:", err)
}

Loading…
Cancel
Save