Filter chain

171 views
Skip to first unread message

Guido Lova

unread,
Apr 7, 2017, 5:59:08 AM4/7/17
to Fluentd Google Group
Hi,
i'm using a filter chain with fluentd 0.12 without problems. Updating it to 0.14 it seems no more possible to use a key name in two chained filters. This is an example of a not working config:

 <source>
    @type exec
    command "echo \"test\""
    keys k1
    run_interval 2s
    tag test
  </source>

<filter test>
  @type record_transformer
  enable_ruby
  <record>
    myhostname zumpappa
    appname ${hostname.gsub(/-?[0-9]+$/,'')}
  </record>
</filter>

<filter test>
  @type record_transformer
  <record>
    builttag file.${myhostname}.${appname}.XXX
  </record>
</filter>

the result is:
2017-04-07 11:58:14 +0200 [warn]: #0 unknown placeholder `${myhostname}` found
2017-04-07 11:58:14 +0200 [warn]: #0 unknown placeholder `${appname}` found

any idea of why is not working in fluent 0.14 ?

tks

Rich Megginson

unread,
Apr 7, 2017, 9:28:05 AM4/7/17
to flu...@googlegroups.com
Because fluent 0.14 has deprecated the feature of making fields into top
level variables of the same name.

You will need to use ${record['myhostname']} instead of ${myhostname}, etc.

>
> tks
>
> Bravofly Rumbo Group
>
> Listed on SIX Swiss Exchange
>
> *Our websites*: lastminute.com <http://lastminute.com> | bravofly.com
> <http://bravofly.com> | volagratis.com <http://volagratis.com> |
> rumbo.es <http://rumbo.es> | jetcost.com <http://jetcost.com> |
> group.lastminute.com <http://group.lastminute.com>
>
> This e-mail may contain confidential and/or privileged information. If
> you are not the intended recipient (or have received this e-mail in
> error) please notify the sender immediately and destroy this e-mail.
> Any unauthorized copying, disclosure or distribution of the material
> in this e-mail is strictly forbidden and could be a crime.
>
> --
> 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
> <mailto:fluentd+u...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.


Guido Lova

unread,
Apr 7, 2017, 9:49:46 AM4/7/17
to Fluentd Google Group

good to know.

thank you!
Reply all
Reply to author
Forward
0 new messages