mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
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.
|
// Continusouly dispatch notifications.
|
||||||
func (n *NotificationHandler) Run() {
|
func (n *NotificationHandler) Run() {
|
||||||
for reqs := range n.pendingNotifications {
|
for reqs := range n.pendingNotifications {
|
||||||
|
if n.alertmanagerUrl == "" {
|
||||||
|
log.Println("No alert manager configured, not dispatching notification")
|
||||||
|
}
|
||||||
if err := n.sendNotifications(reqs); err != nil {
|
if err := n.sendNotifications(reqs); err != nil {
|
||||||
log.Println("Error sending notification:", err)
|
log.Println("Error sending notification:", err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue