Merge pull request #6921 from huydx/master

fix(alert): alert test should return error when it failed to dispatch
pull/6928/head
Carl Bergquist 9 years ago committed by GitHub
commit a5c41fe7cb
  1. 1
      pkg/services/alerting/notifiers/email.go
  2. 1
      pkg/services/alerting/notifiers/opsgenie.go
  3. 1
      pkg/services/alerting/notifiers/pagerduty.go
  4. 1
      pkg/services/alerting/notifiers/slack.go
  5. 1
      pkg/services/alerting/notifiers/victorops.go
  6. 1
      pkg/services/alerting/notifiers/webhook.go
  7. 1
      public/app/plugins/datasource/imon-datasource

@ -89,6 +89,7 @@ func (this *EmailNotifier) Notify(evalContext *alerting.EvalContext) error {
if err != nil {
this.log.Error("Failed to send alert notification email", "error", err)
return err
}
return nil

@ -112,6 +112,7 @@ func (this *OpsGenieNotifier) closeAlert(evalContext *alerting.EvalContext) erro
if err := bus.DispatchCtx(evalContext.Ctx, cmd); err != nil {
this.log.Error("Failed to send notification to OpsGenie", "error", err, "body", string(body))
return err
}
return nil

@ -89,6 +89,7 @@ func (this *PagerdutyNotifier) Notify(evalContext *alerting.EvalContext) error {
if err := bus.DispatchCtx(evalContext.Ctx, cmd); err != nil {
this.log.Error("Failed to send notification to Pagerduty", "error", err, "body", string(body))
return err
}
return nil

@ -105,6 +105,7 @@ func (this *SlackNotifier) Notify(evalContext *alerting.EvalContext) error {
if err := bus.DispatchCtx(evalContext.Ctx, cmd); err != nil {
this.log.Error("Failed to send slack notification", "error", err, "webhook", this.Name)
return err
}
return nil

@ -94,6 +94,7 @@ func (this *VictoropsNotifier) Notify(evalContext *alerting.EvalContext) error {
if err := bus.DispatchCtx(evalContext.Ctx, cmd); err != nil {
this.log.Error("Failed to send victorops notification", "error", err, "webhook", this.Name)
return err
}
return nil

@ -74,6 +74,7 @@ func (this *WebhookNotifier) Notify(evalContext *alerting.EvalContext) error {
if err := bus.DispatchCtx(evalContext.Ctx, cmd); err != nil {
this.log.Error("Failed to send webhook", "error", err, "webhook", this.Name)
return err
}
return nil

@ -0,0 +1 @@
Subproject commit e8d219fa68b85dfc20762a584f4c931740ed0efa
Loading…
Cancel
Save