-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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] Move data stream mappings from index template to component template. #121184
Comments
Pinging @elastic/fleet (Team:Fleet) |
I remember previous discussions where folks were worried around users potentially destroying their setup by manually changing mappings, if for example pipelines or dashboards/UIs were built with assumptions around the mappings. Have these concerns been addressed? |
Hi @simitt, you are right, in the current design moving the mappings to the One way we could reduce this risk (but not eliminate entirely) is to make the Any thoughts here @joshdover ? |
So basically only allow fields that are not part of the default |
I think we should solve this problem in the high-level API we're planning to introduce as part of #121118 rather than trying to fix it here. The reason being that I think we should view direct edits to the The high-level API can provide more guardrails against this type of thing by only allowing additive mapping changes, for example. @mostlyjason I think you should weigh in this too as you have more context of what the use case is intended to be for users to have direct access to |
++ to what Josh said about offering an escape hatch. I remember in a previous company we were parsing apache status field as an int, and but its really a discrete rather than continuous variable, so keyword is better. The only way someone could fix that is by overriding the default mapping. Sure, a user could mess it up, but they can easily revert to the default behavior by deleting their customization. We can fix bugs in our templates, but it may not be on the user's timeline. This gives users control over their own cluster. I don't have as much context about the high level API. If its an implementation concern I'd leave it to Josh and the eng team. |
I have investigated this a bit further and it seems that Example APM Traces
|
That is the current behavior, but the change we're implementing in this issue would allow users to also override the out-of-the-box mappings from the integration as an escape hatch. Do you think this is a big problem for APM? |
In #121118 and also in an earlier comment on this issue you mention allowing additive mapping. I am a bit confused now of whether or not users would then actually be able to also change the mappings that are shipped with the package. If that is planned, could you elaborate on the requirements for this? Everything I read in this issue, and the other linked one about a guided API does not motivate or require to change existing mappings, only to add new ones. Maybe I am just overlooking something, so apologies for asking this again. I am all +1 on making a more guided UI/API and allowing users to add their own mappings. In my comment above I wanted to highlight that adding new mappings is already possible today, as I didn't expect that and thought it is worth sharing, in case others were confused by this too or need a workaround until some more tailored solution is available. |
Hi @simitt, thanks for the comments. Allowing users to change the mappings supplied by the package is not a direct goal of this PR but an acceptable side effect. @joshdover has always described the |
@hop-dev @joshdover Just tested the upgrade from 8.x and 7.x to 8.2 and the new |
@nchaulet Thanks for testing! Could you open an issue for following up on the cleanup of |
Currently, integration data stream mappings are set directly on the index template, we are proposing moving this to being set on a component template.
This will enable us to centrally store and manage the mapping in the component template while potentially having multiple data streams using that component template (e.g a namespace specific data stream).
Not having the data stream in a component template has blocked progress on #108554 (and meant we had to revert some ILM docs #119013).
Technical details
(See Jen's useful comment here)
We set the mappings in the index template here:
kibana/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/install.ts
Line 388 in 8c8c62e
We also have the ability for packages to set custom mappings, so our solution would have to still be compatible with this behaviour:
kibana/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/install.ts
Line 225 in 8c8c62e
The text was updated successfully, but these errors were encountered: