I was wondering how to use env vars in the Fluentd config, I tried:
<match **>
type elasticsearch
logstash_format true
logstash_prefix $ENV_VAR
host ***
port ***
include_tag_key true
tag_key _key
</match>
but it doesn't work, any idea?
I was wondering how to use env vars in the Fluentd config, I tried:
<match **>
type elasticsearch
logstash_format true
logstash_prefix $ENV_VAR
host ***
port ***
include_tag_key true
tag_key _key
</match>
but it doesn't work, any idea?
EDIT:
Here is a much better solution:
If you pass "--use-v1-config" option to Fluentd, this is possible with the "#{ENV['env_var_name']" like this:
Old, kludgey answer is here.
fluent-plugin-record-reformer
andfluent-plugin-forest
In particular, do NOT use
<match **>
there. That would catch all events and will lead to behaviors that are hard to debug.