-
Notifications
You must be signed in to change notification settings - Fork 72
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
[Discuss] Default mappings for dynamic fields #178
Comments
@jpountz This also ties into what we should use for the ES base templates. Would be great to get your thoughts on this. |
I think we'd want the "custom" fields (anything outside of ECS) to be either runtime or index: false. This would mean that we'd need to again specify explicitly all ECS keyword fields that we want to be indexed on write. On the alerts Alerts side (elastic/kibana#100884) we're having the advantage that all custom fields are not top-level, but nested under Could we do something similar, in the sense that all custom fields must go under a given prefix? Probably not, right? |
Do we really need to index all the ECS fields? In case of a package, I would expect the fields that should be really index are specified. To cover better for ECS fields there might be the middle ground, that we defined all the ECS prefixes like Having all ECS fields in each mapping even as runtime fields I would assume would mean lots of data in the cluster state. |
I would like to revive this discussion. The Elasticsearch templates for In general, I think we should stop indexing all fields by default. The question is, should we go for runtime by default or index false? What are the pros and cons from an Elasticsearch perspective? @jpountz If we make the change, it should apply in Elasticsearch and Fleet (@joshdover ). Would we consider this a breaking change? |
@ruflin In short,
In terms of disk usage, fields with
I would not consider this a breaking change. We are free to change the performance characteristics of mappings produced by our integrations. The same queries that work with today's mappings would still work after this change. |
My intuition is that Maybe it would help to use a concrete example. Would you only make this change to dynamically-mapped changes, which I expect to be application-specific fields, or also to some of the fields that are populated by Agent like |
I had a follow up discussion on this with @jpountz . Some general thoughts:
If we would expose the dynamic_mapping to packages, we could start experiment with some of the packages and later make a more fundamental change in ES itself.
It sounds like before we do the change, there should be a mechanism in Fleet for users to potentially overwrite the mapping to have the old performance back. @joshdover My understand is that this is possible with the For the examples:
|
For clarity, |
@joshdover Assigned to you for now but likely best driven forward by someone in the ecosystem or Fleet team. |
Today all the templates are setup with the following dynamic templates
By default all the unknown fields are mapped by Elasticsearch and all matching string to keyword. This issue is to discuss what our defaults should be moving forward.
Mapping all fields by default comes at a storage cost. In recent releases Elasticsearch has introduced runtime fields and
dynamic: runtime
as an option. An other option is to disable indexing completely and only allow runtime fields on query time.Related issue: #39
The text was updated successfully, but these errors were encountered: