Rewrite tag for Fluentd. It is designed to rewrite the tags and re-emit the record with rewritten tag. Values can only be added at the start or the end of the tag.
This is an output plugin because fluentd's filter doesn't allow tag rewriting.
gem install fluent-plugin-tag_rewrite
<match **>
@type tag_rewrite
tag_prefix start
tag_suffix end
</match>
You must provide at least one of tag_prefix or tag_suffix
If your fluentd match configuration is the same as above followed by a match configuration like this:
<match start.fluent.**>
@type stdout
</match>
The output will be:
| original record | rewritten tag record |
|---------------------------------------|-------------------------------------------------|
| fluent.warn {"message":"[info]: ..."} | start.fluent.warn.end {"message":"[info]: ..."} |
fluent-plugin-tag_rewrite | fluentd |
---|---|
>= 1.0.0 | >= v1.14.0 < 2 |
- Fork it ( http://github.com/tombolaltd/fluent-plugin-tag_rewrite/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Copyright (c) 2019 - tombola.
The gem is available as open source under the terms of the MIT License.