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

Perform true partial updates when updating the alerting rule after execution #192397

Open
2 of 3 tasks
mikecote opened this issue Sep 9, 2024 · 1 comment · May be fixed by #193341
Open
2 of 3 tasks

Perform true partial updates when updating the alerting rule after execution #192397

mikecote opened this issue Sep 9, 2024 · 1 comment · May be fixed by #193341
Assignees
Labels
Feature:Alerting Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams)

Comments

@mikecote
Copy link
Contributor

mikecote commented Sep 9, 2024

When an alerting rule finishes running, it updates select fields within the rule saved-object to reflect the new timestamp it last run, the success/failure outcome, etc. The saved-object update method recently got changed to support downward-compatible updates (#152807) by performing a get + Kibana side update before calling index. These extra requests when running many rules add extra latency and I/O to Elasticsearch that we do not need to perform when updating rules at the end of their execution.

Definition of Done

  • Rules update themselves after a run by using the Elasticsearch client directly instead of the saved-objects client
  • Only the necessary fields are passed to the update function to perform a partial update
  • Preferably, other code using the partiallyUpdateRule function also leverage benefits from this work
@mikecote mikecote added Feature:Alerting Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) labels Sep 9, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/response-ops (Team:ResponseOps)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Alerting Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams)
Projects
None yet
3 participants