Skip to content

Commit

Permalink
Merge pull request #702 from prometheus/log-failed-notifiers
Browse files Browse the repository at this point in the history
Include notifier type in retry logs and errors
  • Loading branch information
juliusv authored Apr 11, 2017
2 parents b7bea3d + 7f1d111 commit 0ce2de5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions notify/notify.go
Original file line number Diff line number Diff line change
Expand Up @@ -543,9 +543,9 @@ func (r RetryStage) Exec(ctx context.Context, alerts ...*types.Alert) (context.C
case <-tick.C:
if retry, err := r.integration.Notify(ctx, alerts...); err != nil {
numFailedNotifications.WithLabelValues(r.integration.name).Inc()
log.Debugf("Notify attempt %d failed: %s", i, err)
log.Debugf("Notify attempt %d for %q failed: %s", i, r.integration.name, err)
if !retry {
return ctx, alerts, fmt.Errorf("Cancelling notify retry due to unrecoverable error: %s", err)
return ctx, alerts, fmt.Errorf("Cancelling notify retry for %q due to unrecoverable error: %s", r.integration.name, err)
}

// Save this error to be able to return the last seen error by an
Expand Down

0 comments on commit 0ce2de5

Please sign in to comment.