Showing with 163 additions and 76 deletions.
  1. +22 −0 .github/workflows/pdk-test-unit.yml
  2. +22 −0 .github/workflows/pdk-validate.yml
  3. +7 −0 CHANGELOG.md
  4. +5 −2 README.md
  5. +1 −1 manifests/config.pp
  6. +8 −6 metadata.json
  7. +92 −67 templates/input.yml.erb
  8. +6 −0 templates/prospector.yml.erb
22 changes: 22 additions & 0 deletions .github/workflows/pdk-test-unit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Run pdk test unit

on:
- push
- pull_request

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v3

- name: Run unit tests
uses: puppets-epic-show-theatre/action-pdk-test-unit@v1
with:
puppet-version: ""
# [optional]
# A string indicating the Puppet version to validate against, such as "5.4.2" or "5.5".
pe-version: ""
# [optional]
# A string indicating the PE version to validate against, such as "2017.3.5" or "2018.1".
22 changes: 22 additions & 0 deletions .github/workflows/pdk-validate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Run pdk static validation

on:
- push
- pull_request

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v3

- name: Run pdk validate
uses: puppets-epic-show-theatre/action-pdk-validate@v1
with:
puppet-version: ""
# [optional]
# A string indicating the Puppet version to validate against, such as "5.4.2" or "5.5".
pe-version: ""
# [optional]
# A string indicating the PE version to validate against, such as "2017.3.5" or "2018.1".
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ Changelog
## Unreleased
[Full Changelog](https://github.com/pcfens/puppet-filebeat/compare/v4.13.0...HEAD)

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

- Template SSL Correction [\#322](https://github.com/pcfens/puppet-filebeat/pull/322)
- Avoid deprecated has_ssl method [\#324](https://github.com/pcfens/puppet-filebeat/pull/324)
- Add missing options to JSON decoding config [\#326](https://github.com/pcfens/puppet-filebeat/pull/326)

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

Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,11 @@ as documented in the filebeat [configuration documentation](https://www.elastic.
#### JSON Logs

Filebeat inputs (versions >= 5.0) can natively decode JSON objects if they are stored one per line. The `json`
parameter accepts a hash containing `message_key`, `keys_under_root`, `overwrite_keys`, and `add_error_key`
as documented in the filebeat [configuration documentation](https://www.elastic.co/guide/en/beats/filebeat/5.5/configuration-filebeat-options.html#config-json).
parameter accepts a hash containing `message_key`, `keys_under_root`, `overwrite_keys`, and `add_error_key`.

Depending on the version, `expand_keys`, `document_id` and `ignore_decoding_error` may be supported as well.

See the filebeat [configuration documentation](https://www.elastic.co/guide/en/beats/filebeat/7.11/filebeat-input-log.html#filebeat-input-log-config-json) for details.

### Inputs in Hiera

Expand Down
2 changes: 1 addition & 1 deletion manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
class filebeat::config {
$major_version = $filebeat::major_version

if has_key($filebeat::setup, 'ilm.policy') {
if 'ilm.policy' in $filebeat::setup {
file { "${filebeat::config_dir}/ilm_policy.json":
content => to_json({ 'policy' => $filebeat::setup['ilm.policy'] }),
notify => Service['filebeat'],
Expand Down
14 changes: 8 additions & 6 deletions metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pcfens-filebeat",
"version": "4.13.0",
"version": "4.14.0",
"author": "pcfens",
"summary": "A module to install and manage the filebeat log shipper",
"license": "Apache-2.0",
Expand All @@ -10,11 +10,11 @@
"dependencies": [
{
"name": "puppetlabs/stdlib",
"version_requirement": ">=4.13.0 < 9.0.0"
"version_requirement": ">=4.13.0 < 10.0.0"
},
{
"name": "puppetlabs/apt",
"version_requirement": ">=2.0.0 < 9.0.0"
"version_requirement": ">=2.0.0 < 10.0.0"
},
{
"name": "puppetlabs/powershell",
Expand Down Expand Up @@ -42,15 +42,17 @@
"operatingsystem": "OracleLinux",
"operatingsystemrelease": [
"6",
"7"
"7",
"8"
]
},
{
"operatingsystem": "RedHat",
"operatingsystemrelease": [
"5",
"6",
"7"
"7",
"8"
]
},
{
Expand Down Expand Up @@ -101,7 +103,7 @@
"requirements": [
{
"name": "puppet",
"version_requirement": ">= 4.0.0 < 8.0.0"
"version_requirement": ">= 4.0.0 < 9.0.0"
}
],
"tags": [
Expand Down
Loading