How to keep the 'time' field of fluentd message from my custom plugin?

45 views
Skip to first unread message

Cary Huang

unread,
May 3, 2015, 11:38:36 PM5/3/15
to flu...@googlegroups.com
Hi, If the regexp has a capture named ‘time’, it'll be removed by default, how can I keep it in my custom plugin? 'include_time_key' params seems doesn't work? 

Below is my config:

<source>
  type tail
  path /fluent/log
  format /^<(?<time>.*)> <(?<msg>.*)>$/
  tag test
</source>

<match test>
  type custom_plugin
  include_time_key true
</match>

Cary Huang

unread,
May 4, 2015, 1:17:05 AM5/4/15
to flu...@googlegroups.com
The regexp has a capture named 'time', but I don't want it to be consider as time, I want to treat it as normal field, is it possible?

Mr. Fiber

unread,
May 4, 2015, 11:51:13 AM5/4/15
to flu...@googlegroups.com
Hi,

If you want to set time field, you can use record_transformer filter for now.
For keeping time field, we will have keep_time_field option soon.



Masahiro

On Mon, May 4, 2015 at 2:17 PM, Cary Huang <huan...@gmail.com> wrote:
The regexp has a capture named 'time', but I don't want it to be consider as time, I want to treat it as normal field, is it possible?

--
You received this message because you are subscribed to the Google Groups "Fluentd Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fluentd+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages