Showing with 22 additions and 16 deletions.
  1. +5 −0 CHANGELOG.md
  2. +1 −1 metadata.json
  3. +16 −15 templates/input.yml.erb
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ Changelog
## Unreleased
[Full Changelog](https://github.com/pcfens/puppet-filebeat/compare/v4.5.0...HEAD)

## [v4.6.0](https://github.com/pcfens/puppet-filebeat/tree/v4.6.0)
[Full Changelog](https://github.com/pcfens/puppet-filebeat/compare/v4.5.0...v4.6.0)

- Allow processors to be applied to all inputs, and consolidated common configuration [\#260](https://github.com/pcfens/puppet-filebeat/pull/260)

## [v4.5.0](https://github.com/pcfens/puppet-filebeat/tree/v4.5.0)
[Full Changelog](https://github.com/pcfens/puppet-filebeat/compare/v4.4.2...v4.5.0)

Expand Down
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pcfens-filebeat",
"version": "4.5.0",
"version": "4.6.0",
"author": "pcfens",
"summary": "A module to install and manage the filebeat log shipper",
"license": "Apache-2.0",
Expand Down
31 changes: 16 additions & 15 deletions templates/input.yml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,6 @@
<%- else -%>
---
- type: <%= @input_type %>
<%- if @fields.length > 0 -%>
fields:
<%- @fields.each_pair do |k, v| -%>
<%= k %>: <%= v %>
<%- end -%>
<%- end -%>
fields_under_root: <%= @fields_under_root %>
<%- if @tags.length > 0 -%>
tags:
<%- @tags.each do |tag| -%>
- <%= tag %>
<%- end -%>
<%- end -%>
<%- if @input_type =~ /(tcp|udp)/ -%>
host: <%= @host %>
<%- if @max_message_size -%>
Expand Down Expand Up @@ -201,10 +188,24 @@
<%- if @close_timeout -%>
close_timeout: <%= @close_timeout %>
<%- end -%>
<%- end -%>
<%- # Everthing below this can be applied to any input. %>
<%- # https://www.elastic.co/guide/en/beats/filebeat/current/configuration-general-options.html#configuration-general %>
<%- if @fields.length > 0 -%>
fields:
<%- @fields.each_pair do |k, v| -%>
<%= k %>: <%= v %>
<%- end -%>
<%- end -%>
fields_under_root: <%= @fields_under_root %>
<%- if @tags.length > 0 -%>
tags:
<%- @tags.each do |tag| -%>
- <%= tag %>
<%- end -%>
<%- end -%>
<%- if @processors.length > 0 -%>
# Managing processors releated only for specified input
processors:
<%- %><%= @processors.to_yaml.lines.drop(1).join.gsub(/^/, ' ') -%>
<%- end -%>
<%- end %>
<%- end %>