Skip to content

Commit

Permalink
修复当prestate=alerting,newstate=alerting的情况无法触发notify的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaoxiangchun committed May 21, 2020
1 parent 899c31d commit 4a784c1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/monitor/alerting/notifiers/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ func (n *NotifierBase) ShouldNotify(_ context.Context, evalCtx *alerting.EvalCon
return false
}

if newState == monitor.AlertStateAlerting {
return true
}

// Only notify on state change
if prevState == newState && !n.SendReminder {
return false
Expand Down

0 comments on commit 4a784c1

Please sign in to comment.