Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Metrics] Add recovered context to the Inventory Threshold rule #127125

Closed
Kerry350 opened this issue Mar 8, 2022 · 2 comments
Closed

[Metrics] Add recovered context to the Inventory Threshold rule #127125

Kerry350 opened this issue Mar 8, 2022 · 2 comments
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

Comments

@Kerry350
Copy link
Contributor

Kerry350 commented Mar 8, 2022

Summary

The alerting framework now supports context on the recovered group.

Please see this issue first: #126617

Implementation hints

Inside the rule executor, when the executor has finished scheduling actions for active alerts, the following code should be added:

// Call done() to gain access to recovery utils
// If `doesSetRecoveryContext` is set to `false`, getRecoveredAlerts() returns an empty list
const { getRecoveredAlerts } = alertsFactory.done();

for (const alert of getRecoveredAlerts()) {
	const alertId = alert.getId();
	alert.setContext({
		CONTEXT HERE!
	})
}

(Taken from meta issue)

Acceptance Criteria

  • All (or the ones that make sense) of our context variables should be available as part of the recovered group.
@Kerry350 Kerry350 added 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 labels Mar 8, 2022
@elasticmachine
Copy link
Contributor

Pinging @elastic/infra-monitoring-ui (Team:Infra Monitoring UI)

@smith
Copy link
Contributor

smith commented Apr 13, 2022

Duplicate of #126279.

@smith smith closed this as completed Apr 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

3 participants