From 196a4185fbcc8af5a464837be31bbe86844ee4b5 Mon Sep 17 00:00:00 2001 From: Kentaro Hayashi Date: Mon, 23 Oct 2023 16:46:41 +0900 Subject: [PATCH] Update explanation about existing plugins --- README.md | 35 +++++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index e7d2b56..aa79d4b 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,24 @@ # fluent-plugin-filter-split -[Fluentd](https://fluentd.org/) filter plugin to do something. - -TODO: write description for you plugin. +[Fluentd](https://fluentd.org/) filter plugin to split specified field. + +Compared to existing plugins: + +* https://github.com/wshihadeh/fluent-plugin-record-splitter + * This is filter plugin. It splits the specified field into multiple records. The target field must be lines. +* https://github.com/unquietwiki/fluent-plugin-split_record + * This is filter plugin. It splits the specified field into key/value pairs. The target field must contain "key=value" pairs. +* https://github.com/SNakano/fluent-plugin-split-array + * This is filter plugin. It splits the specified field into multiple records. The target field must be always array. +* https://github.com/toyama0919/fluent-plugin-split + * This is output plugin. It splits the specified field into multiple records. The target field must contains specific separator. +* https://github.com/activeshadow/fluent-plugin-split-event + * This is filter plugin. It splits the specified field into multiple records. The target field must contains specific separator. +* https://github.com/bitpatty/fluent-plugin-filter-split-message + * 404. The only gem exists. https://rubygems.org/gems/fluent-plugin-filter-split-message + * This is filter plugin. It splits the specified field into multiple records. The target field must contains specific separator. + +Thus, about above plugins, there are limitation of type of field or missing feature to control keep/remove other fields. ## Installation @@ -28,13 +44,12 @@ $ bundle ## Configuration -You can generate configuration template: - -``` -$ fluent-plugin-config-format filter filter-split -``` - -You can copy and paste generated documents here. +|parameter|type|description|default| +|---|---|---|---| +|split_key|string (required)|Specify a target key to split|| +|keep_other_key|bool (optional)|Specify a flag whether other key must be kept or not|| +|keep_keys|array (optional)|Specify keys to be kept in filtered record|`[]`| +|remove_keys|array (optional)|Specify keys to be removed in filtered record|`[]`| ## Copyright