fluent-plugin-record-modifier
fluent-plugin-record-modifier copied to clipboard
New parameter `replace_keys`:
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
Could you add test?