Skip to content

New parameter replace_keys: #19

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

Open
wants to merge 1 commit into
base: v0.12
Choose a base branch
from

Conversation

alexfouche
Copy link

Whether to replace a key or not if already in the record. Defaults to true to preserve compatibility

Use case:
I use the record modifier filter to add an hostname key in the record, then forwards record to another Fluentd. Which itself also tails its logs besides collecting records from other Fluentd. But since it tails its own log, i also added the record modifier to set the hostname. This has the side effect of replacing the hostname key of all collected records from other fluentd on other hosts with its hostname.
Thus, i added a boolean flag to prevent overwriting a key (in this example the hostname) if the record already has the key

…ady in the record. Defaults to true to preserve compatibility
@repeatedly
Copy link
Owner

Could you add test?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants