Hello,
We are using fluent-plugin-azurestorage plugin.
For some reason Variable %{hostname} not being honored in azure_object_key_format.
Output files are names as "20180215-11_0-.json" instead of "20180215-11_0-swstoreprod4.json"
Following are the version details:
OS ubuntu14.04fluent-plugin-azurestorage (0.1.0)
ubuntu@swstoreprod4:~$ ruby -vruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux]
ubuntu@swstoreprod4:~$ fluentd -v/home/ubuntu/.rvm/gems/ruby-2.4.1/gems/fluentd-1.1.0/lib/fluent/supervisor.rb:735:in `initialize': No such file or directory @ rb_sysopen - /etc/fluent/fluent.conf (Errno::ENOENT)
from /home/ubuntu/.rvm/gems/ruby-2.4.1/gems/fluentd-1.1.0/lib/fluent/supervisor.rb:735:in `open'
from /home/ubuntu/.rvm/gems/ruby-2.4.1/gems/fluentd-1.1.0/lib/fluent/supervisor.rb:735:in `read_config'
from /home/ubuntu/.rvm/gems/ruby-2.4.1/gems/fluentd-1.1.0/lib/fluent/supervisor.rb:451:in `run_supervisor'
from /home/ubuntu/.rvm/gems/ruby-2.4.1/gems/fluentd-1.1.0/lib/fluent/command/fluentd.rb:310:in `<top (required)>'
from /home/ubuntu/.rvm/rubies/ruby-2.4.1/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /home/ubuntu/.rvm/rubies/ruby-2.4.1/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /home/ubuntu/.rvm/gems/ruby-2.4.1/gems/fluentd-1.1.0/bin/fluentd:8:in `<top (required)>'
from /home/ubuntu/.rvm/gems/ruby-2.4.1/bin/fluentd:23:in `load'
from /home/ubuntu/.rvm/gems/ruby-2.4.1/bin/fluentd:23:in `<main>'
from /home/ubuntu/.rvm/gems/ruby-2.4.1/bin/ruby_executable_hooks:15:in `eval'
from /home/ubuntu/.rvm/gems/ruby-2.4.1/bin/ruby_executable_hooks:15:in `<main>'
ubuntu@swstoreprod4:~$ td --version0.15.2
ubuntu@swstoreprod4:~$ hostnameswstoreprod4
td-agent.conf file snippet:
<match file.swym.bi.sessions>
type file
path /var/log/td-agent/swstore-sessions
time_slice_format %Y%m%d%H
time_slice_wait 10m
time_format %Y-%m-%d %H:%M:%S
time_key time
##include_time_key true
utc
</match>
<match swym.bi.sessions>
type azurestorage
azure_storage_account <>
azure_storage_access_key <>
azure_container bi-logs
azure_storage_type blob
store_as json
auto_create_container true
path swym.bi.sessions/
azure_object_key_format %{path}%{time_slice}_%{index}-%{hostname}.%{file_extension}
buffer_path /var/log/td-agent/azurestorage/sessions
time_slice_format %Y%m%d-%H
time_slice_wait 10m
utc
flush_interval 60m
output_tag false
output_time false
buffer_chunk_limit 1000k
</match>
Can someone please assist here?
Thanks,
Krishna