Merge pull request #6122 from zhaoxiangchun/automated-cherry-pick-of-#6121-upstream-release-3.2

Automated cherry pick of #6121: monitor,对于监控数据nodata,默认不发送邮件
This commit is contained in:
Zexi Li
2020-04-29 19:36:05 +08:00
committed by GitHub
+5
View File
@@ -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