mirror of
https://github.com/prometheus/prometheus.git
synced 2024-11-10 07:34:04 -08:00
Merge pull request #342 from prometheus/optional-alertmanager
Drop notifications when no alert manager URL is configured.
This commit is contained in:
commit
89797e08eb
|
@ -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 a new issue