alert rule have to be pending before alerting is for is specified

This commit is contained in:
bergquist
2018-11-15 15:37:46 +01:00
parent 7ba04466a2
commit caec36e7ec
2 changed files with 13 additions and 3 deletions
+1 -1
View File
@@ -126,7 +126,7 @@ func (c *EvalContext) GetNewState() m.AlertStateType {
}
since := time.Now().Sub(c.Rule.LastStateChange)
if since > c.Rule.For {
if c.PrevAlertState == m.AlertStatePending && since > c.Rule.For {
return m.AlertStateAlerting
}