pcfens / puppet-filebeat

Apache License 2.0
61 stars 179 forks source link

indentation for processors not working #78

Closed cabecada closed 7 years ago

cabecada commented 7 years ago

This feature (supporting processors) does not seem to work. https://github.com/pcfens/puppet-filebeat/pull/69/commits/90e70af4659966f9d63b8528f0c4c16e09799f90

class{"filebeat":
  processors => [
    {
      "name" => "include_fields",
      "params" => {"fields" => ["cpu"]}
    },
    {
      "name" => "drop_fields",
      "params" => {"fields" => ["cpu.user", "cpu.system"]}
    },
    {
      "name" => "drop_event",
      "when" => {"equals" => {"http.code" => 200}}
    },
  ],
}
### puppet agent -t 
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Failed to parse template filebeat/filebeat5.yml.erb:
  Filepath: /etc/puppet/modules/filebeat/templates/filebeat5.yml.erb
  Line: 87
  Detail: undefined method `each' for nil:NilClass
 at /etc/puppet/modules/filebeat/manifests/config.pp:38 on node ubuntu1404-2.vagrant.local
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

filebeat: 5.1.2 root@master:/etc/puppet/modules/filebeat# git log -1 commit 4cb659d086f8964d70be40277436068a8f3868e6 Author: Phil Fenstermacher pcfens@wm.edu Date: Thu Jan 19 12:03:45 2017 -0500

Increment version to v0.10.2


https://github.com/pcfens/puppet-filebeat/pull/69/files#diff-5f87021e7184ecfed031149f8249971dR87
should not be mandatory for drop_event processor i guess.
pcfens commented 7 years ago

I'll take a look, but any help that @corey-hammerton can offer as the original author would be much appreciated.

pcfens commented 7 years ago

I'm fairly certain this is all fixed in e858f2d. If you can verify that it is I'll push a new release up to the forge.