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

[alerting] allow rules to "reset" themselves when params change #115544

Open
pmuellr opened this issue Oct 19, 2021 · 3 comments
Open

[alerting] allow rules to "reset" themselves when params change #115544

pmuellr opened this issue Oct 19, 2021 · 3 comments
Labels
discuss estimate:needs-research Estimated as too large and requires research to break down into workable issues Feature:Alerting/RulesFramework Issues related to the Alerting Rules Framework Feature:Alerting Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams)

Comments

@pmuellr
Copy link
Member

pmuellr commented Oct 19, 2021

Spawned from #110080 (comment):

Some initial thoughts (that will need validation): Increasing the [rule] threshold and this way causing the condition to stop being met is not a recovery. If you change the threshold, you have reset the rule.

Good insight that we've now seen in practice. Lots of questions:

  • how does the alerting framework indicate the rule should be "reset"?
  • what do we do with the existing active alerts?
  • we probably need new event log events, and these should probably also consider the "reset" that occurs with enable/disable
  • we could this today by just "nulling" the rule state (stored in the task document) during a rule update, but maybe this is something rules should opt into
@pmuellr pmuellr added discuss Feature:Alerting Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) Feature:Alerting/RulesFramework Issues related to the Alerting Rules Framework labels Oct 19, 2021
@elasticmachine
Copy link
Contributor

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

@gmmorris gmmorris added the estimate:needs-research Estimated as too large and requires research to break down into workable issues label Oct 20, 2021
@gmmorris
Copy link
Contributor

@arisonl feels like this is more of a product question than a technical one at this stage.
Would love to hear your thoughts about how this behaviour should be.

@pmuellr
Copy link
Member Author

pmuellr commented Oct 20, 2021

One thought on how this could be done would be too allow rule types to opt-in to a "reset on update" behavior. So we'd clear the task state / active instances if it was set "on".

We have an issue for connector I refer to as "hooks for create/update/delete" - #106724 - that would allow connector types to get a chance to "do things" during those client API calls. We could provide a similar capability for rules, and then that would provide a way for a rule type to "opt-in" for a more customized experience. Maybe only when some of the rule params change, the rule should "reset". This would likely require us to provide some kind of service API the ruletype could invoke in these hook callbacks, to indicate that it wants things reset (task state, alerts, etc). I've updated that issue to mention this "hook" capability may be useful for rules as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discuss estimate:needs-research Estimated as too large and requires research to break down into workable issues Feature:Alerting/RulesFramework Issues related to the Alerting Rules Framework Feature:Alerting Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams)
Projects
No open projects
Development

No branches or pull requests

4 participants