Reputation: 1576
How can we easily transform with fluentd( and plugins ) something like this
{
"remote": "87.85.14.126",
"city": "saint-hubert"
}
To this:
{
"geoip": {
"remote": "87.85.14.126",
"city": "saint-hubert"
}
}
Thank you
Upvotes: 13
Views: 4333
Reputation: 3699
Based on the answer by repeatedly(https://github.com/repeatedly).
<filter test.**>
@type record_transformer
enable_ruby true
auto_typecast true
<record>
geoip ${{"remote" => "${remote}", "city" => "${city}"}}
</record>
</filter>
Upvotes: 7