rewrite tag plugin and quotes

22 views
Skip to first unread message

Christophe Pache

unread,
Nov 25, 2016, 4:27:07 AM11/25/16
to Fluentd Google Group
Hello everyone,

I'm trying to suffix a tag with a field, using the rewrite tag plugin such as

<match dev.kamon.fluentd.** >
  @type rewrite_tag_filter
  rewriterule1 stats.name "(.*)" "${tag}.$1"
</match>

Well, I added quotes because otherwise, I got no outputs, but now, I get tags in quotes. Any idea what I'm doing wrong would be really much appreciated!

Thanks and cheers
Christophe

Y. Kentaro

unread,
Nov 25, 2016, 9:50:36 AM11/25/16
to flu...@googlegroups.com
Hi

If you have nested record, you will got fine with following code.
Because rewrite_tag_filter does not support to access nested value yet.

<filter dev.kamon.fluentd.**>
  @type record_transformer
  enable_ruby
  <record>
    stats_name "${stats[\"name\"]}"
  </record>
</filter>

<match dev.kamon.fluentd.**>
  @type rewrite_tag_filter
  rewriterule1 stats_name (.*) ${tag}.$1
</match>


<filter dev.kamon.fluentd.**>
  @type record_transformer
  remove_keys stats_name
</filter>

Let's try it on.



--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mr. Fiber

unread,
Nov 28, 2016, 5:07:20 AM11/28/16
to Fluentd Google Group
"${stats[\"name\"]}"

Don't use this short-cut syntax.
This is removed since next v0.14 version.


Reply all
Reply to author
Forward
0 new messages