Showing with 27 additions and 8 deletions.
  1. +5 −0 CHANGELOG.md
  2. +8 −0 manifests/prospector.pp
  3. +1 −1 metadata.json
  4. +13 −7 templates/prospector5.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/v0.9.1...HEAD)

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

- Add support for close_* and clean_* parameters in prospectors [\#70](https://github.com/pcfens/puppet-filebeat/pull/70)

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

Expand Down
8 changes: 8 additions & 0 deletions manifests/prospector.pp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@
$backoff = '1s',
$max_backoff = '10s',
$backoff_factor = 2,
$close_inactive = '5m',
$close_renamed = false,
$close_removed = true,
$close_eof = false,
$clean_inactive = 0,
$clean_removed = true,
$close_timeout = 0,
$force_close_files = false,
$include_lines = [],
$exclude_lines = [],
Expand All @@ -25,6 +32,7 @@

validate_hash($fields, $multiline)
validate_array($paths, $exclude_files, $include_lines, $exclude_lines, $tags)
validate_bool($tail_files, $close_renamed, $close_removed, $close_eof, $clean_removed)

$prospector_template = $filebeat::real_version ? {
'1' => 'prospector1.yml.erb',
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": "0.9.1",
"version": "0.9.2",
"author": "pcfens",
"license": "Apache-2.0",
"summary": "A module to install and manage the filebeat log shipper",
Expand Down
20 changes: 13 additions & 7 deletions templates/prospector5.yml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -121,33 +121,39 @@ filebeat:
# Close inactive closes the file handler after the predefined period.
# The period starts when the last line of the file was, not the file ModTime.
# Time strings like 2h (2 hours), 5m (5 minutes) can be used.
#close_inactive: 5m
<%- if @close_inactive -%>
close_inactive: <%= @close_inactive %>
<%- 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.
#close_renamed: false
close_renamed: <%= @close_renamed %>

# When enabling this option, a file handler is closed immediately in case a file can't be found
# any more. In case the file shows up again later, harvesting will continue at the last known position
# after scan_frequency.
#close_removed: true
close_removed: <%= @close_removed %>

# Closes the file handler as soon as the harvesters reaches the end of the file.
# By default this option is disabled.
# Note: Potential data loss. Make sure to read and understand the docs for this option.
#close_eof: false
close_eof: <%= @close_eof %>

### State options

# Files for the modification data is older then clean_inactive the state from the registry is removed
# By default this is disabled.
#clean_inactive: 0
<%- if @clean_inactive -%>
clean_inactive: <%= @clean_inactive %>
<%- end -%>

# Removes the state for file which cannot be found on disk anymore immediately
#clean_removed: true
clean_removed: <%= @clean_removed %>

# Close timeout closes the harvester after the predefined time.
# This is independent if the harvester did finish reading the file or not.
# By default this option is disabled.
# Note: Potential data loss. Make sure to read and understand the docs for this option.
#close_timeout: 0
<%- if @close_timeout -%>
close_timeout: <%= @close_timeout %>
<%- end -%>