No commit activity in last 3 years
No release in over 3 years
Output plugin to format fields of records and re-emit them.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 1.3
>= 0

Runtime

 Project Readme

Fluent::Plugin::Format, a plugin for Fluentd

Output plugin to format fields of records.

You can add or change fields using existing values and re-emit them.

Installation

$ gem install fluent-plugin-format

Usage

<match input.tag>
    type format
    tag output.tag
    key1 Hi, I'm %{key1}!
    new_key1 key1 is %{key1}.
    new_key2 key1 is %{key1}, key2 is %{key2}.
</match>

Pass this record:

input.tag: {
    "key1": "val1",
    "key2": "val2"
}

Then you get:

output.tag: {
    "key1": "Hi, I'm val1!",
    "key2": "val2",
    "new_key1": "key1 is val1.",
    "new_key2": "key1 is val1, key2 is val2."
}

include_original_fields

You can set include_original_fields false to exclude original fields (defalut true).

<match input.tag>
    type format
    tag output.tag
    include_original_fields false
    html <h1>%{title}</h1><div><%{content}/div>
</match>

Pass this record:

input.tag: {
    "title": "Fluentd: Open Source Log Management",
    "content": "Fluentd is an open-source tool to collect events and logs. 150+ plugins instantly enables you to store the massive data for Log Search, Big Data Analytics, and Archiving (MongoDB, S3, Hadoop)."
}

Then you get:

output.tag {
    "html": "<h1>Fluentd: Open Source Log Management</h1><div>Fluentd is an open-source tool to collect events and logs. 150+ plugins instantly enables you to store the massive data for Log Search, Big Data Analytics, and Archiving (MongoDB, S3, Hadoop).</div>"
}