Output split array plugin for fluentd.
- td-agent v2(fluentd ~> 0.12.0)
- fluent-plugin-record_splitter < 0.1.6
- td-agnet v3(fluentd ~> 0.14.0)
- fluent-plugin-record_splitter >= 0.1.6
gem install fluent-plugin-record_splitter
<match pattern>
type record_splitter
tag foo.split
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.split
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'}
Author | Yuri Odagiri |
Copyright | Copyright (c) 2015- Yuri Odagiri |
License | MIT License |