From 24f4bb1f07009b5083b6fe3b4d5a693c0c0c2a55 Mon Sep 17 00:00:00 2001 From: Julius Volz Date: Tue, 30 Jul 2013 23:06:38 +0200 Subject: [PATCH] Drop notifications when no alert manager URL is configured. --- notification/notification.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/notification/notification.go b/notification/notification.go index 633b80f2a..6df5c6de3 100644 --- a/notification/notification.go +++ b/notification/notification.go @@ -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) }