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

[Fleet] Add a find orphaned integration policies API #129677

Closed
jen-huang opened this issue Apr 6, 2022 · 3 comments
Closed

[Fleet] Add a find orphaned integration policies API #129677

jen-huang opened this issue Apr 6, 2022 · 3 comments
Labels
Supportability Improve our (devs, SREs, support eng, users) ability to troubleshoot/self-service product better. Team:Fleet Team label for Observability Data Collection Fleet team

Comments

@jen-huang
Copy link
Contributor

jen-huang commented Apr 6, 2022

Describe the feature:

Similar to #121887. We've had several reports where the root cause is that somehow an integration policy became orphaned. That is, its parent agent policy does not exist.

Proposal

POST /internal/fleet/find_orphaned_policies

This would return a list of all orphaned policies - but not delete them yet. I think subsequent deletion should be up to the user as there might be information they want to capture from the policies before they are lost. It would then be trivial to plug in the policy IDs into the deletion API:

$ curl -X POST -u USERNAME:PASSWORD <KBN_HOST>/api/fleet/package_policies/delete -H 'kbn-xsrf: xyz' -H "Content-Type: application/json" -d '{"packagePolicyIds": ["some-id-1", "some-id-2"], "force": true}'

Edit: the above curl doesn't actually work, due to #129683. The workaround is to delete the saved objects directly:

DELETE .kibana/_doc/ingest-package-policies:<INTEGRATION_POLICY_ID>
@jen-huang jen-huang added Team:Fleet Team label for Observability Data Collection Fleet team Supportability Improve our (devs, SREs, support eng, users) ability to troubleshoot/self-service product better. labels Apr 6, 2022
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@juliaElastic
Copy link
Contributor

juliaElastic commented May 6, 2022

added API in this pr as part of spacetime project: #131697

@jen-huang
Copy link
Contributor Author

Closing as implemented in #131697.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Supportability Improve our (devs, SREs, support eng, users) ability to troubleshoot/self-service product better. Team:Fleet Team label for Observability Data Collection Fleet team
Projects
None yet
Development

No branches or pull requests

3 participants