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] Use index pattern api to create/update index patterns #86121

Closed
neptunian opened this issue Dec 16, 2020 · 5 comments
Closed

[Fleet] Use index pattern api to create/update index patterns #86121

neptunian opened this issue Dec 16, 2020 · 5 comments
Labels
Team:Fleet Team label for Observability Data Collection Fleet team technical debt Improvement of the software architecture and operational architecture

Comments

@neptunian
Copy link
Contributor

neptunian commented Dec 16, 2020

We should use the new index pattern api to create and update index patterns in Fleet during package installation/upgrade/removal. Before using it, support will need to be added to handle our use case of being able to pass the option "allowNoIndex" in order to prevent the field caps api returning 404 when no indices exist to match an index pattern yet.

We currently write to index pattern SOs directly in https://github.com/elastic/kibana/blob/master/x-pack/plugins/fleet/server/services/epm/kibana/index_pattern/install.ts#L134-L139

@neptunian neptunian added the Team:Fleet Team label for Observability Data Collection Fleet team label Dec 16, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/ingest-management (Team:Ingest Management)

@ph ph added the technical debt Improvement of the software architecture and operational architecture label Jan 11, 2021
@jen-huang
Copy link
Contributor

@ph Thanks for finding this issue, I've linked it to the larger Kibana meta.

This effort is currently blocked as the new index pattern service does not support defining non-scripted fields to be saved, which is what EPM does. Discussions on actively happening on related index pattern issues to find a solution for this. More code details in #94490.

@joshdover
Copy link
Contributor

@hop-dev Do you think this issue is still relevant? I wonder if we should close it now that we're using import/export for index pattern creation?

@hop-dev
Copy link
Contributor

hop-dev commented Feb 7, 2022

@joshdover I believe it could be still relevant yes, using the API seems more robust that creating the saved objects directly. We currently import the index templates every time we import saved objects to avoid the reference checking bug at the time, I believe this issue has since been solved here so we could re-visit this.

We no longer set fields on the index template so I believe we no longer need the flag that was created for us above 😅

@jen-huang
Copy link
Contributor

Closing in favor of #153368.

@jen-huang jen-huang closed this as not planned Won't fix, can't repro, duplicate, stale Mar 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Fleet Team label for Observability Data Collection Fleet team technical debt Improvement of the software architecture and operational architecture
Projects
None yet
Development

No branches or pull requests

6 participants