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

[Alerts][Actions] Support dedicated context per action group #93009

Closed
darnautov opened this issue Mar 1, 2021 · 10 comments
Closed

[Alerts][Actions] Support dedicated context per action group #93009

darnautov opened this issue Mar 1, 2021 · 10 comments
Labels
discuss enhancement New value added to drive a business result estimate:medium Medium Estimated Level of Effort Feature:Alerting/RuleActions Issues related to the Actions attached to Rules on the Alerting Framework Feature:Alerting NeededFor:ML Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams)

Comments

@darnautov
Copy link
Contributor

darnautov commented Mar 1, 2021

Describe the feature:
The alerting framework allows providing context variables per action group.

Describe a specific use case for the feature:
In the Anomaly detection alert type it's possible that selected anomaly detection jobs encountered some issues, e.g. datafeed has been stopped for some reason. In such a scenario we should notify the user. According to the Alerting framework logic, we should create an action group for this case, let's call it Datafeed has been stopped. But this action group would have different context variables. In particular, all anomaly result data is not available, and instead, the job id and the timestamp of when the datafeed has been stopped are provided. Currently, the Recovered action group hides the context variables, so I expected it to be possible for the custom actions group to have dedicated context.

Alternative solution

Alerting framework allows notifying the user about an error state in the alert. In that case, the user can select Run when - Error occurred (should be a built-in action group, similar to the Recover). And it should probably have error.message variable.

@pmuellr
Copy link
Member

pmuellr commented Mar 1, 2021

We still need to do something about a "NO DATA" status - perhaps this would work in this case? I think we'd need to provide some way for an alert type to provide a message providing a description of what happened.

see issue #67296

@darnautov
Copy link
Contributor Author

@pmuellr it might work, but it would require the user to explicitly configure an action for this alert status, wouldn't it? Is it going to be another built-in action group then, i.e. Recovered and No data?

@pmuellr
Copy link
Member

pmuellr commented Mar 2, 2021

Is it going to be another built-in action group then, i.e. Recovered and No data?

It is certainly something like that - probably a new "status" value, and a corresponding built-in action group. Each alert type would have to make it's own determination of "no data" ... eg, for the index threshold, it could be that no index was found, or that the no documents were found for the specified query.

@gmmorris gmmorris added the loe:large Large Level of Effort label Jul 14, 2021
@botelastic botelastic bot added the needs-team Issues missing a team label label Jul 14, 2021
@timroes timroes added the Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) label Jul 21, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-alerting-services (Team:Alerting Services)

@botelastic botelastic bot removed the needs-team Issues missing a team label label Jul 21, 2021
@gmmorris gmmorris added Feature:Alerting/RuleActions Issues related to the Actions attached to Rules on the Alerting Framework enhancement New value added to drive a business result estimate:medium Medium Estimated Level of Effort labels Aug 16, 2021
@gmmorris gmmorris removed the loe:large Large Level of Effort label Sep 2, 2021
@kobelb kobelb added the needs-team Issues missing a team label label Jan 31, 2022
@botelastic botelastic bot removed the needs-team Issues missing a team label label Jan 31, 2022
@mikecote
Copy link
Contributor

mikecote commented Aug 4, 2022

We are planning to move towards a common context (schema) per alert across all rule types. We may need to dig into the use case here to make sure we can move towards a common schema. cc @kobelb

@pmuellr
Copy link
Member

pmuellr commented Nov 3, 2022

As we're currently redesigning how context variables work, we'll keep this in mind, but probably eventually close as we'll have a different architecture.

@ymao1
Copy link
Contributor

ymao1 commented Feb 2, 2023

cc @shanisagiv1

@mikecote
Copy link
Contributor

@darnautov would the transition to alerts as data help with the request? is the request still relevant?

@darnautov
Copy link
Contributor Author

@mikecote I guess it's not relevant anymore, as we introduced the Anomaly detection jobs health rule in #106084

@mikecote
Copy link
Contributor

Ok sounds good, thank you for confirming. We came across this issue during our last backlog refinement session. We'll go ahead and close this. 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discuss enhancement New value added to drive a business result estimate:medium Medium Estimated Level of Effort Feature:Alerting/RuleActions Issues related to the Actions attached to Rules on the Alerting Framework Feature:Alerting NeededFor:ML Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams)
Projects
No open projects
Development

No branches or pull requests

8 participants