Reputation: 79
I use an input syslog and the parser with grok expressions in fluentd. It works well, but I would like to add a key in the fluentd parsed message. The key would be the whole message itself. example with raw key:
{
time: grokked time
host: grokked hostname
...
raw : the whole raw message,
}
how to do that ?
Upvotes: 0
Views: 434
Reputation: 79
yep I got it working at the same time with
<filter syslog>
@type record_transformer
enable_ruby
<record>
raw ${record}
</record>
</filter>
Upvotes: 0
Reputation: 6040
Add another filter:
<filter **>
@type record_transformer
enable_ruby
<record>
raw ${record["message"]}
</record>
</filter>
Upvotes: 1