Fork output by separating values for fluentd.
You can fork the following data
{"id": "1", "key": "2", "segments": "1,2,3"}
to
{"id": "1", "key": "2", "segments": "1"}
{"id": "1", "key": "2", "segments": "2"}
{"id": "1", "key": "2", "segments": "3"}
fluent-plugin-fork | Fluentd | Ruby |
---|---|---|
>= 0.2.0 | >= v0.14, < v2.0 | >= 2.1 |
< 0.2.0 | <= v0.14 | >= 1.9 |
/usr/lib64/fluent/ruby/bin/fluent-gem install fluent-plugin-fork
sudo /usr/local/Cellar/td-agent/1.1.XX/bin/fluent-gem install fluent-plugin-fork
gem install fluent-plugin-fork
output_tag tag_to_output
output_key key_to_output
separator ,
fork_key key_to_fork
max_size 15
max_fallback log
no_unique true
index_key idx
Tag to output forked values
Key name to output forked values
Key name to fork
Separator to separate the values
Default: ,
Max size of forked values.
Default: nil
Strategy when the size of values exceeds max_size
. Only effective when you set max_size
.
log
to log the record
drop
to drop exceeded values
skip
to skip the values
Default: log
Flag to emit redundant values.
Default: false
Field name to add index number of each values.
Default: nil
- Fork it
- 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 new Pull Request
Copyright (c) 2014 Daisuke Taniwaki. See LICENSE for details.