mirror of
https://hubproxy.babadafafafafa.cn/https://github.com/yunionio/cloudpods.git
synced 2026-09-20 08:03:53 +08:00
fix(monitor): monitor error message
This commit is contained in:
@@ -145,7 +145,9 @@ func (n *notificationService) getNeededNotifiers(nIds []string, evalCtx *EvalCon
|
||||
}
|
||||
if shouldNotify || evalCtx.Rule.State == monitor.AlertStateAlerting {
|
||||
go func() {
|
||||
n.createAlertRecordWhenNotify(evalCtx, shouldNotify)
|
||||
if err := n.createAlertRecordWhenNotify(evalCtx, shouldNotify); err != nil {
|
||||
log.Errorf("createAlertRecordWhenNotify error: %v", err)
|
||||
}
|
||||
}()
|
||||
}
|
||||
if !shouldNotify && evalCtx.shouldUpdateAlertState() && evalCtx.NoDataFound {
|
||||
|
||||
@@ -56,7 +56,7 @@ 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
|
||||
// Do not notify if alert state is no_data
|
||||
if newState == monitor.AlertStateNoData {
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user