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

Import ECS dynamic templates into transform destinations #1641

Open
chrisberkhout opened this issue Jan 24, 2024 · 3 comments
Open

Import ECS dynamic templates into transform destinations #1641

chrisberkhout opened this issue Jan 24, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@chrisberkhout
Copy link
Contributor

In an integration set (in _dev/build/build.yml) to import ECS mappings, the build process will inject ECS's dynamic templates at elasticsearch.index_template.mappings.dynamic_templates in data_stream/<ds_name>/manifest.yml.

However, for transforms, it does not put them into destination_index_template.mappings.dynamic_templates in elasticsearch/transform/<transform_name>/manifest.yml.

The relevant code is here.

This came up while building an IOC expiry transform for OpenCTI. The workaround was to add an explicit external field reference for each ECS field used.

@chrisberkhout chrisberkhout added the enhancement New feature or request label Jan 24, 2024
@andrewkroh
Copy link
Member

I think the package-spec also needs to be clarified to state what data streams and indices import_mappings applies to.

https://github.com/elastic/package-spec/blob/a347e4dd88ac1ce1e4c894cfa6e0288460e99eb6/spec/integration/_dev/build/build.spec.yml#L26

@chrisberkhout
Copy link
Contributor Author

@jen-huang It's now preferred to not import ECS mappings, since elastic/integrations#8542.
However, there's still an issue for transforms. The logs index template applies ecs@mappings to logs-*-*, but only for data streams, so it won't be applied to a transform destination index.

@jen-huang
Copy link

cc @kpollich

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants