mirror of
https://github.com/krislamo/puppet-fluentd
synced 2024-12-16 13:20:35 +00:00
45449583d9
- extend source to support format and parse section - extend match to support buffers with chunk keys - update readme
42 lines
1.1 KiB
Plaintext
42 lines
1.1 KiB
Plaintext
<match <%= @pattern %>>
|
|
<% @config.each do |key, val| -%>
|
|
<%- if key == 'buffer_chunk_keys'; next; end-%>
|
|
<%- if val.is_a?( Hash ) -%>
|
|
<<%= key -%><%- if key == 'buffer' && !@config['buffer_chunk_keys'].nil? -%> <%= @config['buffer_chunk_keys'] -%><%- end -%>>
|
|
<%- val.each do |key, val| -%>
|
|
<%= key -%> <%= val %>
|
|
<%- end -%>
|
|
</<%= key %>>
|
|
<%- elsif val.is_a?( Array ) -%>
|
|
<%- val.each do |k, v| -%>
|
|
<<%= key -%>>
|
|
<%- if k.is_a?( Hash ) -%>
|
|
<%- k.each do |x, y| -%>
|
|
<%- if y.is_a?( Array ) -%>
|
|
<%- y.each do |a, b| -%>
|
|
<<%= x -%><%- if x == 'buffer' && !k['buffer_chunk_keys'].nil? -%> <%= k['buffer_chunk_keys'] -%><%- end -%>>
|
|
<%- if a.is_a?( Hash ) -%>
|
|
<%- a.each do |c, d| -%>
|
|
<%= c -%> <%= d %>
|
|
<%- end -%>
|
|
<%- else -%>
|
|
<%= a -%> <%= b %>
|
|
<%- end -%>
|
|
</<%= x %>>
|
|
<%- end -%>
|
|
<%- else -%>
|
|
<%- if x == 'buffer_chunk_keys'; next; end -%>
|
|
<%= x -%> <%= y %>
|
|
<%- end -%>
|
|
<%- end -%>
|
|
<%- else -%>
|
|
<%= k -%> <%= v %>
|
|
<%- end -%>
|
|
</<%= key %>>
|
|
<%- end -%>
|
|
<%- else -%>
|
|
<%= key -%> <%= val %>
|
|
<%- end -%>
|
|
<% end -%>
|
|
</match>
|