Drop notifications when no alert manager URL is configured.
This commit is contained in:
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…
Reference in New Issue