No release in over a year
This Fluentd plugin takes array values from a specified field and creates separate records for each array element.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 2.1.2
~> 13.0.6
~> 3.3.9

Runtime

>= 1.11.1, < 2
 Project Readme

fluent-plugin-array-splitter

Overview

This Fluentd filter plugin allows you to split array values within json formatted log records.

Installation

RubyGems

$ gem install fluent-plugin-array-splitter

Bundler

Add following line to your Gemfile:

gem "fluent-plugin-array-splitter"

And then execute:

$ bundle

Configuration

Parameters

parameter type description default
array_key string (required) The target field name to split array values
key_name string (optional) The field name to rename the key of a single array element nil

Example Configuration

<filter pattern>
  @type array_splitter
  array_key message
  key_name new_key
</filter>

Usage

With the above configuration, an input like:

{"message": ["value1", "value2"]}

will result in two records:

{"new_key": "value1"}
{"new_key": "value2"}

If you have an input like:

{"message": [{"key1": "value1"}, {"key2": "value2"}]}

will result as follows:

{"key1": "value1"}
{"key2": "value2"}

Copyright

  • Copyright(c) 2023- pcoffmanjr
  • License
    • Apache License, Version 2.0