-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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] Set dynamic field mapping to false or runtime #128072
Comments
Pinging @elastic/fleet (Team:Fleet) |
@jpountz Would be great to get your take on the above as this might also have an effect on what we should do with the default templates in Elasticsearch. |
@mukeshelastic assigning this to you as it has a Needs PM definition status. |
@vinaychandrasekhar @mlunadia going to need your help understand the priority, use cases and their importance of the requested change before making the change.. |
Doing it by default for all packages might be considered a breaking change. Instead what we could do is making it a config option per dataset to move towards a feature where this becomes the default. (@felixbarny ) |
I've had a discussion with @jpountz a while ago on whether we should consider changes to the default mappings a breaking change or not. We could treat the absence of a more specialized index template as a way to mean "I don't care / I don't know, do whatever feels sensible" and set the expectation with users that built-in index templates may change at any time. @jpountz response:
|
+1 to the above take. :) Also if my understanding is correct, we're discussing the option to use |
One thing to consider on performance is how this may affect the ability to do alerting. From my understanding, runtime fields in alerts is generally a no go due to how slow the query may be on a decently sized data set. At the very least, we may want to make sure that when a runtime field is used in an alert, there's helpful feedback if the query is too slow and the fix is to map the field. |
It's not the first time that alerting comes up as a reason why we're hesitating to move fields to runtime fields (for good reasons!). For reference, this is the main thing that made me want to enable Elasticsearch to make the decision about runtime vs. not, since it's already tracking field usage. We could map fields as |
Fleet with the package managers installs the package assets. Part of it is installing the Elasticsearch index templates. Elasticsearch by default has dynamic fields set to true: https://www.elastic.co/guide/en/elasticsearch/reference/current/dynamic-field-mapping.html This was convenient to make sure all fields can be queried. But over the past few months, Elasticsearch introduced runtime fields: https://www.elastic.co/guide/en/elasticsearch/reference/current/runtime.html This allows fields which were not index during ingestion to be still queried.
This issue should be used to discuss what the default setting should be in Fleet for
dynamic
and how we should handle the default block of dynamic_templates that is added to each template around keywords. Do we still need this?As an example, here an excerpt mapping of the
logs-system.security
data stream:Some previous work around optimising the template was done in: #104620
The text was updated successfully, but these errors were encountered: