mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-25 05:34:05 -08:00
4daaa59c08
Prometheus restores alert state between restarts and updates. For each rule, it looks at the alerts that are meant to be active and then queries the `ALERTS_FOR_STATE` series for _each_ alert within the rules. If the alert rule has 120 instances (or series) it'll execute the same query with slightly different labels. This PR changes the approach so that we only query once per alert rule and then match the corresponding alert that we're about to restore against the series-set. While the approach might use a bit more memory at start-up (if even?) the restore proccess is only ran once per restart so I'd consider this a big win. This builds on top of #13974 Signed-off-by: gotjosh <josue.abreu@gmail.com> |
||
---|---|---|
.. | ||
fixtures | ||
alerting.go | ||
alerting_test.go | ||
group.go | ||
manager.go | ||
manager_test.go | ||
origin.go | ||
origin_test.go | ||
recording.go | ||
recording_test.go | ||
rule.go |