Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

filebeat5.yml template requires setting empty partition option for Kafka output #54

Closed
spectrumjade opened this issue Nov 7, 2016 · 1 comment

Comments

@spectrumjade
Copy link

I'm in the process of deploying Filebeat v5 with Kafka output. I get an error if I do not provide a partition option to the Kafka configuration.

This is my current configuration:

class { '::filebeat':
  manage_repo => false,
  registry_file => '/var/lib/filebeat/registry',
  outputs => {
    'kafka' => {
      'enabled' => true,
      'hosts' => $kafka_hosts,
      'topic' => '%{[type]}',
      'compression' => 'gzip',
      'ssl' => {
        'enabled' => true,
      }
    },
  },
}

With this configuration, however, I receive the following compilation failure:

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Failed to parse template filebeat/filebeat5.yml.erb:
  Filepath: /etc/puppet/environments/test/module_repos/filebeat/templates/filebeat5.yml.erb
  Line: 276
  Detail: undefined method `[]' for nil:NilClass
 at /etc/puppet/environments/test/module_repos/filebeat/manifests/config.pp:29 on node test
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

The following configuration is necessary to get the template to compile:

class { '::filebeat':
  manage_repo => false,
  registry_file => '/var/lib/filebeat/registry',
  outputs => {
    'kafka' => {
      'enabled' => true,
      'hosts' => $kafka_hosts,
      'topic' => '%{[type]}',
      'compression' => 'gzip',
      'partition' => {},
      'ssl' => {
        'enabled' => true,
      }
    },
  },
}

Having a dangling empty config option is rather non-elegant however. Can this be fixed such that I can remove the partition element?

@pcfens pcfens closed this as completed in ad90690 Nov 7, 2016
@pcfens
Copy link
Owner

pcfens commented Nov 7, 2016

Thanks. I pushed a fix up to the forge as 0.8.5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants