fix notifier, return means no other notifications will work. instead continue in case other notifications should alert

This commit is contained in:
Cameron Davison 2015-04-27 16:16:48 -05:00
parent 0a3a0a811c
commit fc6a513f7f
1 changed files with 3 additions and 3 deletions

View File

@ -366,7 +366,7 @@ func (n *notifier) handleNotification(a *Alert, op notificationOp, config *pb.No
}
for _, emailConfig := range config.EmailConfig {
if op == notificationOpResolve && !emailConfig.GetSendResolved() {
return
continue
}
if *smtpSmartHost == "" {
glog.Warning("No SMTP smarthost configured, not sending email notification.")
@ -378,7 +378,7 @@ func (n *notifier) handleNotification(a *Alert, op notificationOp, config *pb.No
}
for _, poConfig := range config.PushoverConfig {
if op == notificationOpResolve && !poConfig.GetSendResolved() {
return
continue
}
if err := n.sendPushoverNotification(poConfig.GetToken(), op, poConfig.GetUserKey(), a); err != nil {
glog.Error("Error sending Pushover notification: ", err)
@ -386,7 +386,7 @@ func (n *notifier) handleNotification(a *Alert, op notificationOp, config *pb.No
}
for _, hcConfig := range config.HipchatConfig {
if op == notificationOpResolve && !hcConfig.GetSendResolved() {
return
continue
}
if err := n.sendHipChatNotification(op, hcConfig, a); err != nil {
glog.Error("Error sending HipChat notification: ", err)