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

Deleting a Kibana space containing running alerting rules does not delete the rule's task Saved Objects #139227

Open
pmuellr opened this issue Aug 22, 2022 · 2 comments
Labels
Feature:Security/Spaces Platform Security - Spaces feature Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! triage_needed

Comments

@pmuellr
Copy link
Member

pmuellr commented Aug 22, 2022

Currently running alerting rules have two Saved Objects (SOs) associated with them - a rule and task SO:

  • the rule SO is space specific, and contains the "business logic" of the alerting rule
  • the task SO is space agnostic, and is used by task manager to coordinate running the alerting rule

When a user deletes a Kibana space with running alerting rules, the rule SO's will be deleted, but the task SO's will not. The alerting framework will end up trying to run the task eventually (based on the task SO), and fail indicating that it can't find the rule SO, after which it marks the task as failed will not be tried again.

This is causing "expected" failures that we would like to avoid, as it's noisy log messages to the customers. It is currently affecting our "health status" (we move into bad health states with lots of failures), and so causing some false alarms regarding Kibana status. And it's a performance hit running tasks that are guaranteed to fail, and consume a task slot while doing so.

Ideally, when deleting an alerting rule in any situation, the delete should be done via the alerting client and not the saved object client (or saved object plugin itself, at a lower level). Somehow we need to get the "delete space" API to work in this mode.

@pmuellr pmuellr added Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! Feature:Security/Spaces Platform Security - Spaces feature labels Aug 22, 2022
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-core (Team:Core)

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-security (Team:Security)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Security/Spaces Platform Security - Spaces feature Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! triage_needed
Projects
None yet
Development

No branches or pull requests

3 participants