[Metrics] Add recovered context to the Inventory Threshold rule #127125
Labels
Feature:Metrics UI
Metrics UI feature
Team:Infra Monitoring UI - DEPRECATED
DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services
Summary
The alerting framework now supports context on the
recovered
group.Please see this issue first: #126617
Implementation hints
We need to set
doesSetRecoveryContext
totrue
on the rule type. The rule is registered here: https://github.com/elastic/kibana/blob/main/x-pack/plugins/infra/server/lib/alerting/inventory_metric_threshold/register_inventory_metric_threshold_rule_type.ts#L64Relevant action variables: https://github.com/elastic/kibana/blob/main/x-pack/plugins/infra/server/lib/alerting/inventory_metric_threshold/register_inventory_metric_threshold_rule_type.ts#L93
(Taken from meta issue)
Here is an example of where we set
fired
context: https://github.com/elastic/kibana/blob/main/x-pack/plugins/infra/server/lib/alerting/inventory_metric_threshold/inventory_metric_threshold_executor.ts#L85Some code already exists for recovered handling, but is disabled, e.g:
https://github.com/elastic/kibana/blob/main/x-pack/plugins/infra/server/lib/alerting/inventory_metric_threshold/inventory_metric_threshold_executor.ts#L159
https://github.com/elastic/kibana/blob/main/x-pack/plugins/infra/server/lib/alerting/inventory_metric_threshold/inventory_metric_threshold_executor.ts#L196
https://github.com/elastic/kibana/blob/main/x-pack/plugins/infra/server/lib/alerting/inventory_metric_threshold/inventory_metric_threshold_executor.ts#L17
Acceptance Criteria
recovered
group.The text was updated successfully, but these errors were encountered: