Showing with 27 additions and 12 deletions.
  1. +2 −0 .travis.yml
  2. +9 −2 CHANGELOG.md
  3. +3 −3 manifests/processor.pp
  4. +2 −2 metadata.json
  5. +6 −0 templates/filebeat5.yml.erb
  6. +5 −5 templates/prospector5.yml.erb
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,7 @@ matrix:
- rvm: 2.1.10
bundler_args: --without system_tests development
env: PUPPET_GEM_VERSION="3.8.7"
allow_failures:
- env: PUPPET_GEM_VERSION="3.8.7"
notifications:
email: false
11 changes: 9 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,16 @@ Changelog
=========

## Unreleased
[Full Changelog](https://github.com/pcfens/puppet-filebeat/compare/v0.11.1...HEAD)
[Full Changelog](https://github.com/pcfens/puppet-filebeat/compare/v0.11.2...HEAD)

## [v0.11.0](https://github.com/pcfens/puppet-filebeat/tree/v0.11.1)
## [v0.11.2](https://github.com/pcfens/puppet-filebeat/tree/v0.11.2)
[Full Changelog](https://github.com/pcfens/puppet-filebeat/compare/v0.11.1...v0.11.2)

- Explicitly support newer versions of the powershell modules [\#105](https://github.com/pcfens/puppet-filebeat/issues/105)
- Support kafka codec.format module [\#106](https://github.com/pcfens/puppet-filebeat/pull/106)
- The `add_locale` processor doesnt' require parameters [\#104](https://github.com/pcfens/puppet-filebeat/pull/104)

## [v0.11.1](https://github.com/pcfens/puppet-filebeat/tree/v0.11.1)
[Full Changelog](https://github.com/pcfens/puppet-filebeat/compare/v0.11.0...v0.11.1)

- Restore puppet 3.x compatibility regression ([PUP-2523](https://tickets.puppetlabs.com/browse/PUP-2523))
Expand Down
6 changes: 3 additions & 3 deletions manifests/processor.pp
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@
$_priority = $priority
}

if $processor_name == 'drop_field' and $when == undef {
if $processor_name == 'drop_event' and $when == undef {
fail('drop_event processors require a condition, without one ALL events are dropped')
}
elsif $processor_name != 'add_cloud_metadata' and $params == undef {
elsif $processor_name != 'add_cloud_metadata' and $processor_name != 'add_locale' and $params == undef {
fail("${processor_name} requires parameters to function as expected")
}

if $processor_name == 'add_cloud_metadata' {
$_configuration = delete_undef_values(merge({'timeout' => '3s'}, $params))
}
elsif $processor_name == 'drop_field' {
elsif $processor_name == 'drop_event' {
$_configuration = $when
}
else {
Expand Down
4 changes: 2 additions & 2 deletions metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pcfens-filebeat",
"version": "0.11.1",
"version": "0.11.2",
"author": "pcfens",
"license": "Apache-2.0",
"summary": "A module to install and manage the filebeat log shipper",
Expand Down Expand Up @@ -74,7 +74,7 @@
},
{
"name": "puppetlabs/powershell",
"version_requirement": ">= 1.0.1 < 2.0.0"
"version_requirement": ">= 1.0.1 < 3.0.0"
},
{
"name": "lwf/remote_file",
Expand Down
6 changes: 6 additions & 0 deletions templates/filebeat5.yml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,12 @@ output.kafka:
<%- if @filebeat_config['output']['kafka']['key'] != nil -%>
key: '<%= @filebeat_config['output']['kafka']['key'] %>'
<%- end -%>
<%- if @filebeat_config['output']['kafka']['codec.format'] != nil -%>
codec.format:
<%- if @filebeat_config['output']['kafka']['codec.format']['string'] != nil -%>
string: <%= @filebeat_config['output']['kafka']['codec.format']['string'] %>
<%- end -%>
<%- end -%>
<%- if @filebeat_config['output']['kafka']['partition'] != nil and @filebeat_config['output']['kafka']['partition']['hash'] != nil -%>
partition.hash:
<%- if @filebeat_config['output']['kafka']['partition']['hash']['reachable_only'] != nil -%>
Expand Down
10 changes: 5 additions & 5 deletions templates/prospector5.yml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -72,27 +72,27 @@ filebeat:
# JSON key on which to apply the line filtering and multiline settings. This key
# must be top level and its value must be string, otherwise it is ignored. If
# no text key is defined, the line filtering and multiline features cannot be used.
<%- if @json['message_key'] -%>
<%- if @json['message_key'] != nil-%>
message_key: '<%= @json['message_key'] %>'
<%- end -%>

# By default, the decoded JSON is placed under a "json" key in the output document.
# If you enable this setting, the keys are copied top level in the output document.
<%- if @json['keys_under_root'] -%>
<%- if @json['keys_under_root'] != nil -%>
keys_under_root: <%= @json['keys_under_root'] %>
<%- end -%>

# If keys_under_root and this setting are enabled, then the values from the decoded
# JSON object overwrite the fields that Filebeat normally adds (type, source, offset, etc.)
# in case of conflicts.
<%- if @json['overwrite_keys'] -%>
<%- if @json['overwrite_keys'] != nil -%>
overwrite_keys: <%= @json['overwrite_keys'] %>
<%- end -%>

# If this setting is enabled, Filebeat adds a "json_error" key in case of JSON
# unmarshaling errors or when a text key is defined in the configuration but cannot
# be used.
<%- if @json['add_error_key'] -%>
<%- if @json['add_error_key'] != nil -%>
add_error_key: <%= @json['add_error_key'] %>
<%- end -%>
<%- end -%>
Expand Down Expand Up @@ -142,7 +142,7 @@ filebeat:
# Time strings like 2h (2 hours), 5m (5 minutes) can be used.
<%- if @close_inactive -%>
close_inactive: <%= @close_inactive %>
<%- end -%>
<%- end -%>

# Close renamed closes a file handler when the file is renamed or rotated.
# Note: Potential data loss. Make sure to read and understand the docs for this option.
Expand Down