[aws_logs] Remove fixed value from event.dataset mapping#15507
Merged
Conversation
We can't assume event.dataset is always aws_logs.genericsince, users commonly clone the index template.
💚 Build Succeeded
History
cc @zmoog |
Kavindu-Dodan
approved these changes
Oct 1, 2025
|
Package aws_logs - 1.8.3 containing this change is available at https://epr.elastic.co/package/aws_logs/1.8.3/ |
agithomas
pushed a commit
to agithomas/integrations
that referenced
this pull request
Oct 30, 2025
Remove the constant value `logs-aws_logs.generic` from the `event.dataset` mapping. **Context** The Custom AWS Logs integration is an integration package, so it doesn't automatically create a new index template for each installation, as input packages do. To overcome this single index template limit, users manually clone the `logs-aws_logs.generic` index template (for more context, see the [comment](elastic#13433 (comment))) and adapt it for a custom dataset. Unfortunately, all index template clones reference the same `logs-aws_logs.generic@package` component template that maps `event.dataset` as `constant_keyword` with a constant value of `logs-aws_logs.generic`. This means data streams created from the cloned index templates reject documents with `event.dataset` values other than `logs-aws_logs.generic`. **Changes** In this PR I removed the fixed value, but we have at least two options: - We can keep the `event.dataset` mapping as `constant_keyword` without the fixed value to `logs-aws_logs.generic`. - Change the mapping to `keyword` to align with ECS https://www.elastic.co/docs/reference/ecs/ecs-event#field-event-dataset to give users more flexibility.
tehbooom
pushed a commit
to tehbooom/integrations
that referenced
this pull request
Nov 19, 2025
Remove the constant value `logs-aws_logs.generic` from the `event.dataset` mapping. **Context** The Custom AWS Logs integration is an integration package, so it doesn't automatically create a new index template for each installation, as input packages do. To overcome this single index template limit, users manually clone the `logs-aws_logs.generic` index template (for more context, see the [comment](elastic#13433 (comment))) and adapt it for a custom dataset. Unfortunately, all index template clones reference the same `logs-aws_logs.generic@package` component template that maps `event.dataset` as `constant_keyword` with a constant value of `logs-aws_logs.generic`. This means data streams created from the cloned index templates reject documents with `event.dataset` values other than `logs-aws_logs.generic`. **Changes** In this PR I removed the fixed value, but we have at least two options: - We can keep the `event.dataset` mapping as `constant_keyword` without the fixed value to `logs-aws_logs.generic`. - Change the mapping to `keyword` to align with ECS https://www.elastic.co/docs/reference/ecs/ecs-event#field-event-dataset to give users more flexibility.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed commit message
Remove the constant value
logs-aws_logs.genericfrom theevent.datasetmapping.Context
The Custom AWS Logs integration is an integration package, so it doesn't automatically create a new index template for each installation, as input packages do.
To overcome this single index template limit, users manually clone the
logs-aws_logs.genericindex template (for more context, see the comment) and adapt it for a custom dataset.Unfortunately, all index template clones reference the same
logs-aws_logs.generic@packagecomponent template that mapsevent.datasetasconstant_keywordwith a constant value oflogs-aws_logs.generic. This means data streams created from the cloned index templates reject documents withevent.datasetvalues other thanlogs-aws_logs.generic.Changes
In this PR I removed the fixed value, but we have at least two options:
event.datasetmapping asconstant_keywordwithout the fixed value tologs-aws_logs.generic.keywordto align with ECS https://www.elastic.co/docs/reference/ecs/ecs-event#field-event-dataset to give users more flexibility.Checklist
changelog.ymlfile.I have verified that any added dashboard complies with Kibana's Dashboard good practicesHow to test this PR locally
aws_logs.customas custom dataset.logs-aws_logs.genericindex template aslogs-aws_logs.custom, setting the new index pattern aslogs-aws_logs.custom-*.ES should index the document successfully.
Related issues