mirror of
https://github.com/prometheus/prometheus.git
synced 2025-01-11 22:07:27 -08:00
rules: update annotations on each iteration
This commit is contained in:
parent
5b72eae1b0
commit
e68a3cf21f
|
@ -218,8 +218,11 @@ func (r *AlertingRule) Eval(ctx context.Context, ts model.Time, engine *promql.E
|
||||||
fp := smpl.Metric.Fingerprint()
|
fp := smpl.Metric.Fingerprint()
|
||||||
resultFPs[fp] = struct{}{}
|
resultFPs[fp] = struct{}{}
|
||||||
|
|
||||||
|
// Check whether we already have alerting state for the identifying label set.
|
||||||
|
// Update the last value and annotations if so, create a new alert entry otherwise.
|
||||||
if alert, ok := r.active[fp]; ok && alert.State != StateInactive {
|
if alert, ok := r.active[fp]; ok && alert.State != StateInactive {
|
||||||
alert.Value = smpl.Value
|
alert.Value = smpl.Value
|
||||||
|
alert.Annotations = annotations
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue