treasure-data / chef-td-agent

Chef Cookbook for td-agent (Treasure Agent or Fluentd)
https://supermarket.chef.io/cookbooks/td-agent
Apache License 2.0
127 stars 121 forks source link

Transport section in config file #142

Open scalp42 opened 4 years ago

scalp42 commented 4 years ago

Hi @yyuu

I'm trying to use the transport directive and modify the message_length_limit for udp:

<transport udp>
  message_length_limit 4096
</transport>

Unfortunately the following Chef code won't work:

td_agent_source 'syslog_docker_input' do
  type 'syslog'
  parameters(
    port: 5140,
    protocol_type: 'udp',
    parse: {
      message_format: 'rfc5424',
    },
    'transport udp' => {
      message_length_limit: 4096,
    },
    '@log_level': 'info'
  )
end

The end result config is messed up as it tries to add transport udp:

<source>
  @type syslog
  port 5140
  protocol_type udp
  <parse>
    message_format rfc5424
  </parse>
  <transport udp>
    message_length_limit 1000000
  </transport udp>   # <=== This is wrong

Any clues how to work around this?

Thanks in advance!

evandam commented 4 years ago

@yyuu I'm seeing the same issue too. Is there any workaround we could use?