Files
grafana/pkg/services
Matthew Jacobson 087cf5a877 [v9.4.x] Alerting: During legacy migration do not create one silence per rule (#77642)
* Alerting: During legacy migration do not create one silence per rule

During legacy migration every migrated rule is given a label rule_uid=<uid>.
This is used to silence migrated alerts if they were:

- Paused in legacy alerting.
- Had Error state set to keep last state.
- Had NoData state set to keep last state.

This can potentially create a large amount of silences and a high cardinality
label. Both of these scenarios have poor outcomes for CPU load and latency in
unified alerting.

Instead, this change opts to create one or more of three labels on each
migrated alert rule as well as three silence rules:

- migration_paused = true
- migration_keep_last_state_error = true
- migration_keep_last_state_nodata = true

 This will drastically reduce the number of created silence rules in most cases
 as well as not create the potentially high cardinalty label `rule_uid`.
2023-11-03 15:12:52 -04:00
..
2023-01-16 11:54:15 +01:00