monitor,对于监控数据nodata,默认不发送邮件

This commit is contained in:
zhaoxiangchun
2020-04-29 15:18:23 +08:00
parent ba6e8a1656
commit 27e075bfae
+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