JSONL array splitter filter plugin for Fluentd
Requirements
fluent-plugin-jsonl_array_splitter | fluentd | ruby |
---|---|---|
>= 0.1.0 | >= v0.14.0 | >= 2.4 |
Overview
Fluent filter plugin that can construct multiple records from one JSONL formatted (string) record.
Installation
Install from RubyGems:
$ gem install fluent-plugin-jsonl_array_splitter
Configuration
<filter preprocessed.raw.**>
@type jsonl_array_splitter
key_name rawJsonLines
</filter>
Input:
{"command_field": "v1", "rawJsonLines": "{\"key1\": \"val1\"},{\"key2\": \"val2\"}\n{\"key1\": \"val3\"},{\"key2\": \"val4\"}"}
Filter Output:
{"command_field": "v1", "key1": "val1", "key2": "val2"},
{"command_field": "v1", "key1": "val3", "key2": "val4"}
Configuration options
key_name
: JSONL field name that needs to be parsed/splitted
reserve_key
: keep original JSONL field in the output
debug
: print lines that are parsed one-by-one
Contributing
- 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