Skip to content

tombolaltd/fluent-plugin-tag_rewrite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gem Version

fluent-plugin-tag_rewrite

Overview

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.

Installation

gem install fluent-plugin-tag_rewrite

Configuration

<match **>
  @type tag_rewrite
  tag_prefix start
  tag_suffix end
</match>

You must provide at least one of tag_prefix or tag_suffix

Example

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]: ..."} |

Requirements

fluent-plugin-tag_rewrite fluentd
>= 1.0.0 >= v1.14.0 < 2

Contributing

  1. Fork it ( http://github.com/tombolaltd/fluent-plugin-tag_rewrite/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Copyright

Copyright (c) 2019 - tombola.

License

The gem is available as open source under the terms of the MIT License.