Skip to content

Commit

Permalink
monitor,对于监控数据nodata,默认不发送邮件
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaoxiangchun committed Apr 29, 2020
1 parent 4d1b93e commit e81334c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/monitor/alerting/notifiers/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ func (n *NotifierBase) ShouldNotify(_ context.Context, evalCtx *alerting.EvalCon
prevState := evalCtx.PrevAlertState
newState := evalCtx.Rule.State

//Do not notify if alert state is no_data
if newState == monitor.AlertStateNoData {
return false
}

// Only notify on state change
if prevState == newState && !n.SendReminder {
return false
Expand Down

0 comments on commit e81334c

Please sign in to comment.