No commit activity in last 3 years
No release in over 3 years
Fork output by separating values for fluentd
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 0
~> 3.2.0

Runtime

< 2, >= 0.14.0
 Project Readme

fluent-plugin-fork

Gem Version Build Status Coverage Status Code Climate

Fork output by separating values for fluentd.

Example

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"}

Requirements

fluent-plugin-fork Fluentd Ruby
>= 0.2.0 >= v0.14, < v2.0 >= 2.1
< 0.2.0 <= v0.14 >= 1.9

Installation

td-agent(Linux)

/usr/lib64/fluent/ruby/bin/fluent-gem install fluent-plugin-fork

td-agent(Mac)

sudo /usr/local/Cellar/td-agent/1.1.XX/bin/fluent-gem install fluent-plugin-fork

fluentd only

gem install fluent-plugin-fork

Configuration

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

output_tag

Tag to output forked values

output_key

Key name to output forked values

fork_key

Key name to fork

separator (Optional)

Separator to separate the values

Default: ,

max_size (Optional)

Max size of forked values.

Default: nil

max_fallback (Optional)

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

no_unique (Optional)

Flag to emit redundant values.

Default: false

index_key (Optional)

Field name to add index number of each values.

Default: nil

Contributing

  1. Fork it
  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 new Pull Request

Copyright

Copyright (c) 2014 Daisuke Taniwaki. See LICENSE for details.