[aws_logs] Remove fixed value from event.dataset mapping #15507
Merged
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.generic
from theevent.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) and adapt it for a custom dataset.Unfortunately, all index template clones reference the same
logs-aws_logs.generic@package
component template that mapsevent.dataset
asconstant_keyword
with a constant value oflogs-aws_logs.generic
. This means data streams created from the cloned index templates reject documents withevent.dataset
values other thanlogs-aws_logs.generic
.Changes
In this PR I removed the fixed value, but we have at least two options:
event.dataset
mapping asconstant_keyword
without the fixed value tologs-aws_logs.generic
.keyword
to align with ECS https://www.elastic.co/docs/reference/ecs/ecs-event#field-event-dataset to give users more flexibility.Checklist
changelog.yml
file.I have verified that any added dashboard complies with Kibana's Dashboard good practicesHow to test this PR locally
aws_logs.custom
as custom dataset.logs-aws_logs.generic
index template aslogs-aws_logs.custom
, setting the new index pattern aslogs-aws_logs.custom-*
.ES should index the document successfully.
Related issues