mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-10-31 02:38:07 +08:00
Merge pull request #6121 from zhaoxiangchun/bugfix/zxc-monitor-nodata-email
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