Showing with 52 additions and 2 deletions.
  1. +9 −1 CHANGELOG.md
  2. +1 −1 metadata.json
  3. +18 −0 spec/acceptance/001_basic_spec.rb
  4. +24 −0 templates/filebeat.yml.erb
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@ Changelog
=========

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

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

**Fixed Bugs**
- Some configuration parameters should be rendered as integers, not strings
[\#15](https://github.com/pcfens/puppet-filebeat/pull/15)


## [v0.5.6](https://github.com/pcfens/puppet-filebeat/tree/v0.5.6)
[Full Changelog](https://github.com/pcfens/puppet-filebeat/compare/v0.5.5...v0.5.6)
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.5.6",
"version": "0.5.7",
"author": "pcfens",
"license": "Apache-2.0",
"summary": "A module to install and manage the filebeat log shipper",
Expand Down
18 changes: 18 additions & 0 deletions spec/acceptance/001_basic_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,28 @@
class { 'filebeat':
outputs => {
'logstash' => {
'bulk_max_size' => 1024,
'hosts' => [
'localhost:5044',
],
},
'file' => {
'path' => '/tmp',
'filename' => 'filebeat',
'rotate_every_kb' => 10240,
'number_of_files' => 2,
},
},
shipper => {
refresh_topology_freq => 10,
topology_expire => 15,
queue_size => 1000,
},
logging => {
files => {
rotateeverybytes => 10485760,
keepfiles => 7,
}
},
prospectors => {
'system-logs' => {
Expand Down
24 changes: 24 additions & 0 deletions templates/filebeat.yml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,29 @@
<%- @filebeat_config['output']['file']['number_of_files'] = Integer(@filebeat_config['output']['file']['number_of_files']) -%>
<%- end -%>
<%- end -%>
<%- if @filebeat_config['output']['logstash'] -%>
<%- if @filebeat_config['output']['logstash']['bulk_max_size'] -%>
<%- @filebeat_config['output']['logstash']['bulk_max_size'] = Integer(@filebeat_config['output']['logstash']['bulk_max_size']) -%>
<%- end -%>
<%- end -%>
<%- if @filebeat_config['shipper'] -%>
<%- if @filebeat_config['shipper']['refresh_topology_freq'] -%>
<%- @filebeat_config['shipper']['refresh_topology_freq'] = Integer(@filebeat_config['shipper']['refresh_topology_freq']) -%>
<%- end -%>
<%- if @filebeat_config['shipper']['topology_expire'] -%>
<%- @filebeat_config['shipper']['topology_expire'] = Integer(@filebeat_config['shipper']['topology_expire']) -%>
<%- end -%>
<%- if @filebeat_config['shipper']['queue_size'] -%>
<%- @filebeat_config['shipper']['queue_size'] = Integer(@filebeat_config['shipper']['queue_size']) -%>
<%- end -%>
<%- end -%>
<%- if @filebeat_config['logging']['files'] -%>
<%- if @filebeat_config['logging']['files']['rotateeverybytes'] -%>
<%- @filebeat_config['logging']['files']['rotateeverybytes'] = Integer(@filebeat_config['logging']['files']['rotateeverybytes']) -%>
<%- end -%>
<%- if @filebeat_config['logging']['files']['keepfiles'] -%>
<%- @filebeat_config['logging']['files']['keepfiles'] = Integer(@filebeat_config['logging']['files']['keepfiles']) -%>
<%- end -%>
<%- end -%>
### Filebeat configuration managed by Puppet ###
<%= @filebeat_config.to_yaml() %>