henry0312 / fluent-plugin-record_splitter

Output split array plugin for fluentd

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fluent-plugin-record_splitter

Output split array plugin for fluentd.

Installation

gem install fluent-plugin-record_splitter

Configuration

<match pattern>
  type record_splitter
  tag foo.splitted
  split_key target_field
  keep_keys ["common","general"]
</match>

If following record is passed:

{'common':'c', 'general':'g', 'other':'foo', 'target_field':[ {'k1':'v1'}, {'k2':'v2'} ] }

then you got new records like below:

{'common':'c', 'general':'g', 'k1':'v1'}
{'common':'c', 'general':'g', 'k2':'v2'}

another configuration

<match pattern>
  type record_splitter
  tag foo.splitted
  split_key target_field
  keep_other_key true
  remove_keys ["general"]
</match>

If following record is passed:

{'common':'c', 'general':'g', 'other':'foo', 'target_field':[ {'k1':'v1'}, {'k2':'v2'} ] }

then you got new records like below:

{'common':'c', 'other':'foo', 'k1':'v1'}
{'common':'c', 'other':'foo', 'k2':'v2'}

Copyright

AuthorYuri Odagiri
CopyrightCopyright (c) 2015- Yuri Odagiri
LicenseMIT License

About

Output split array plugin for fluentd


Languages

Language:Ruby 100.0%