mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-19 10:46:58 +08:00
monitor,对于监控数据nodata,默认不发送邮件
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user