GithubHelp home page GithubHelp logo

voxpupuli / puppet-logstash Goto Github PK

View Code? Open in Web Editor NEW
191.0 281.0 297.0 1.63 MB

Puppet module to manage Logstash

Home Page: https://forge.puppet.com/elastic/logstash

License: Apache License 2.0

Puppet 46.97% Ruby 47.16% Shell 1.93% HTML 3.93%
hacktoberfest centos-puppet-module debian-puppet-module linux-puppet-module opensuse-puppet-module oraclelinux-puppet-module puppet redhat-puppet-module scientific-puppet-module ubuntu-puppet-module

puppet-logstash's Introduction

logstash

Build Status Release Puppet Forge Puppet Forge - downloads Puppet Forge - endorsement Puppet Forge - scores puppetmodule.info docs Apache-2 License Donated by Elastic

A Puppet module for managing and configuring Logstash.

Version 7 and newer of this module are released by Vox Pupuli. They now follow semantic versioning. Previously the module was maintained by Elastic.

Requirements

  • The stdlib module.
  • Logstash < 7.0.0 requires Java. The puppetlabs/java module is recommended for installing Java.

Optional:

  • The elastic_stack module when using automatic repository management.
  • The apt (>= 2.0.0) module when using repo management on Debian/Ubuntu.
  • The zypprepo module when using repo management on SLES/SuSE.

Quick Start

This minimum viable configuration ensures that Logstash is installed, enabled, and running:

include logstash

# You must provide a valid pipeline configuration for the service to start.
logstash::configfile { 'my_ls_config':
  content => template('path/to/config.file'),
}

Package and service options

Choosing a Logstash major version

This module uses the related "elastic/elastic_stack" module to manage package repositories. Since there is a separate repository for each major version of the Elastic stack, if you don't want the default version, it's necessary to select which version to configure, like this:

class { 'elastic_stack::repo':
  version => 6,
}

include logstash

Choosing a Logstash minor version

class { 'logstash':
  version => '6.8.0',
}

Manual repository management

You may want to manage repositories manually. You can disable automatic repository management like this:

class { 'logstash':
  manage_repo => false,
}

Using an explicit package source

Rather than use your distribution's repository system, you can specify an explicit package to fetch and install.

From an HTTP/HTTPS/FTP URL

class { 'logstash':
  package_url => 'https://artifacts.elastic.co/downloads/logstash/logstash-7.17.8-x86_64.rpm',
}

From a 'puppet://' URL

class { 'logstash':
  package_url => 'puppet:///modules/my_module/logstash-7.17.8-x86_64.rpm',
}

From a local file on the agent

class { 'logstash':
  package_url => 'file:///tmp/logstash-7.17.8-x86_64.rpm',
}

Allow automatic point-release upgrades

class { 'logstash':
  auto_upgrade => true,
}

Use a different logstash home

class { 'logstash':
  home_dir => '/opt/logstash',
}

Do not run as a service

class { 'logstash':
  status => 'disabled',
}

Disable automatic restarts

Under normal circumstances, changing a configuration will trigger a restart of the service. This behaviour can be disabled:

class { 'logstash':
  restart_on_change => false,
}

Disable and remove Logstash

class { 'logstash':
  ensure => 'absent',
}

Logstash config files

Settings

Logstash uses several files to define settings for the service and associated Java runtime. The settings files can be configured with class parameters.

logstash.yml with flat keys

class { 'logstash':
  settings => {
    'pipeline.batch.size'  => 25,
    'pipeline.batch.delay' => 5,
  }
}

logstash.yml with nested keys

class { 'logstash':
  settings => {
    'pipeline' => {
      'batch' => {
        'size'  => 25,
        'delay' => 5,
      }
    }
  }
}

jvm.options

class { 'logstash':
  jvm_options => [
    '-Xms1g',
    '-Xmx1g',
  ]
}

startup.options

class { 'logstash':
  startup_options => {
    'LS_NICE' => '10',
  }
}

pipelines.yml

class { 'logstash':
  pipelines => [
    {
      "pipeline.id" => "pipeline_one",
      "path.config" =>  "/usr/local/etc/logstash/pipeline-1/one.conf",
    },
    {
      "pipeline.id" => "pipeline_two",
      "path.config" =>  "/usr/local/etc/logstash/pipeline-2/two.conf",
    }
  ]
}

Note that specifying pipelines will automatically remove the default path.config setting from logstash.yml, since this is incompatible with pipelines.yml.

Enabling centralized pipeline management with xpack.management.enabled will also remove the default path.config.

Pipeline Configuration

Pipeline configuration files can be declared with the logstash::configfile type.

logstash::configfile { 'inputs':
  content => template('path/to/input.conf.erb'),
}

or

logstash::configfile { 'filters':
  source => 'puppet:///path/to/filter.conf',
}

For simple cases, it's possible to provide your Logstash config as an inline string:

logstash::configfile { 'basic_ls_config':
  content => 'input { heartbeat {} } output { null {} }',
}

You can also specify the exact path for the config file, which is particularly useful with multiple pipelines:

logstash::configfile { 'config_for_pipeline_two':
  content => 'input { heartbeat {} } output { null {} }',
  path    => '/usr/local/etc/logstash/pipeline-2/two.conf',
}

If you want to use Hiera to specify your configs, include the following create_resources call in your manifest:

create_resources('logstash::configfile', hiera('my_logstash_configs'))

...and then create a data structure like this in Hiera:

---
my_logstash_configs:
  nginx:
    template: site_logstash/nginx.conf.erb
  syslog:
    template: site_logstash/syslog.conf.erb

In this example, templates for the config files are stored in the custom, site-specific module "site_logstash".

Patterns

Many plugins (notably Grok) use patterns. While many are included in Logstash already, additional site-specific patterns can be managed as well.

logstash::patternfile { 'extra_patterns':
  source => 'puppet:///path/to/extra_pattern',
}

By default the resulting filename of the pattern will match that of the source. This can be over-ridden:

logstash::patternfile { 'extra_patterns_firewall':
  source   => 'puppet:///path/to/extra_patterns_firewall_v1',
  filename => 'extra_patterns_firewall',
}

IMPORTANT NOTE: Using logstash::patternfile places new patterns in the correct directory, however, it does NOT cause the path to be included automatically for filters (example: grok filter). You will still need to include this path (by default, /etc/logstash/patterns/) explicitly in your configurations.

Example: If using 'grok' in one of your configurations, you must include the pattern path in each filter like this:

# Note: this example is Logstash configuration, not a Puppet resource.
# Logstash and Puppet look very similar!
grok {
  patterns_dir => "/etc/logstash/patterns/"
  ...
}

Plugin management

Installing by name (from RubyGems.org)

logstash::plugin { 'logstash-input-beats': }

Installing from a local Gem

logstash::plugin { 'logstash-input-custom':
  source => '/tmp/logstash-input-custom-0.1.0.gem',
}

Installing from a 'puppet://' URL

logstash::plugin { 'logstash-filter-custom':
  source => 'puppet:///modules/my_ls_module/logstash-filter-custom-0.1.0.gem',
}

Installing from an 'http(s)://' URL

logstash::plugin { 'x-pack':
  source => 'https://artifacts.elastic.co/downloads/packs/x-pack/x-pack-5.3.0.zip',
}

Controling the environment for the logstash-plugin command

logstash::plugin { 'logstash-input-websocket':
  environment => 'LS_JAVA_OPTS=-Xms1g -Xmx1g',
}

Transfer Notice

This module was originally authored by Elastic. The maintainer preferred that Vox Pupuli take ownership of the module for future improvement and maintenance. Existing pull requests and issues were transferred over, please fork and continue to contribute here instead of Elastic.

puppet-logstash's People

Contributors

aalvz avatar adenning avatar bastelfreak avatar baurmatt avatar blalor avatar bryanhelmig avatar cropalato avatar ekohl avatar elasticdog avatar elconas avatar electrical avatar flysen avatar fsalum avatar garthk avatar h-haaks avatar hartfordfive avatar igoraj avatar jarpy avatar jlambert121 avatar jmlrt avatar joshuaspence avatar kenyon avatar pcfens avatar phrawzty avatar sathieu avatar smortex avatar spuder avatar vchan2002 avatar xorpaul avatar zilchms avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

puppet-logstash's Issues

gelf is not working

Hi
i'm trying to use logstash::output::gelf to send logs to graylog2.
my code is:
logstash::output::gelf{"send log to graylog24":
host => "x.x.x.x",
full_message => 'Debug: full message => log from puppet',
port => '12201',
short_message => 'Debug: log from puppet',
require => Class["logstash"],
}

but i'm not able to see anylogs in graylog2
can you help please
thanks

Dependency cycle when using output

Puppet 2.7.11 client and server, Ubuntu 10.04, large EC2 instance. I get the same error using the redis output. Inputs are working.

class { 'logstash':
  java_install => false,
  installpath  => '/opt/logstash',
  provider     => 'custom',
  jarfile      => 'puppet:///modules/baselinux/logstash/logstash-1.1.9-monolithic.jar',
}

logstash::output::stdout { 'logstash_output_stdout': }

Could not apply complete catalog: Found 1 dependency cycle: (Exec[create_config_dir_agent] => File[/etc/logstash/agent/config] => File[/etc/logstash/agent/config/output_stdout_logstash_output_stdout] => Logstash::Output::Stdout[logstash_output_stdout] => Class[Baselinux] => Stage[first] => Stage[second] => Class[Snowflake] => Class[Snowflake] => Stage[second] => Stage[main] => Class[Logstash::Config] => Logstash::Configdir[agent] => Exec[create_config_dir_agent])

I tried adding instances => [ 'test' ], and get a different error:

Failed to apply catalog: Could not find dependent Service[logstash-agent] for File[/etc/logstash/agent/config/input_file_logstash_input_nginx_error] at /volumes/puppet/env/development/modules/logstash/manifests/input/file.pp:306

When updating the jar file, old file is not removed

Reported on IRC.
When a new jar file is specified the old one is not removed.

[12:31.08] Electrical: i stumbled across a nice easter egg with your puppet-logstash
[12:31.14] jarfiles get left behind
[12:32.51] when upgrading to 1.1.10 i noticed that 1.1.9's jar is still there
[12:33.46] jkoppe: ahh okay. yeah, it doesn't purge the dir.. should do that. will open an issue-
for that. also need to work on stuff when someone removes the module ( setting it to absent )

Filter parameters defined multiple times

I am trying to move my logstash config into puppet using this module and running into a pattern I'm not sure how to implement:

grok {
    type => "syslog"
    pattern => [ "<%{POSINT:syslog_pri}>%{SYSLOGTIMESTAMP:syslog_timestamp} %{SYSLOGHOST:syslog_hostname} %{DATA:syslog_program}(?:\[%{POSINT:syslog_pid}\])?: %{GREEDYDATA:syslog_message}" ]
    add_field => [ "received_at", "%{@timestamp}" ]
    add_field => [ "received_from", "%{@source_host}" ]
}

The add_field parameter is defined twice (and is an array internally to logstash). The current grok filter defines:

if $add_field {
validate_hash($add_field)
$arr_add_field = inline_template('<%= add_field.to_a.flatten.inspect %>')
$opt_add_field = " add_field =&gt; ${arr_add_field}\n"
}

Until puppet 3.2 there isn't any form of iteration in modules meaning it will be a very long time before everyone would be able to use that solution. An inline_template could be used with this, but it would be a pain to read and debug. My only thought is an ERB template that can determine if a hash or array of hashes is provided. Would you accept a PR implementing this or do you have a better thought?

LICENSE file missing

I was unable to determine the licensing of this project from either README or CONTRIBUTORS, and there is no LICENSING file. Please add a LICENSE file indicating whatever license this codebase is using.

File buckets try to back up the jarfile, which fails the resource.

Solution is pretty easy: backup => false in package.pp:

file { "${logstash::installpath}/${basefilename}":
  ensure  => present,
  source  => $logstash::jarfile,
  backup  => false,
  require => Exec['create_install_dir']
}

You'll also need backup => false in the next file, as Puppet also tries to back up the contents of the link target.

logrotate support needed

/var/log/logstash/logstash-agent.log and /var/log/logstash/logstash-server.log (or really, /var/log/logstash/logstash-${instance}.log, I guess) need to be rotated via logrotate.

Filter Scope Issue

Utilizing the puppet-logstash module to create filters and use filters in-tandem on events creates scope issues. Specific instance of failure:

logstash::filter::grok{'adc-access':
add_field => {received_from => "%{@source_host}", received_at => "%{@timestamp}"},
pattern => ['%{IPORHOST:clientip} %{USER:ident} %{USER:auth} [%{HTTPDATE:access_timestamp}] "(?:%{WORD:verb} %{NOTSPACE:request}(?: HTTP/%{NUMBER:httpversion})?|-)" %{NUMBER:response} (?:%{NUMBER:bytes}|-) %{QS:referrer} %{QS:agent}'],
tags => ['adc-access'],
}

logstash::filter::date{'adc-access':
match => [ "access_timestamp", "dd/MMM/YYYY:H:mm:ss Z" ],
tags => ['adc-access'],
}

The above creates two files, instead of one and splits the filters up with filter {} scopes.

File: filter_10_grok_adc-access:

filter {

grok {
tags => ['adc-access']
pattern => ['%{COMBINEDAPACHELOG}']
}

}

File: filter_10_date_adc-access:

filter {
date {
match => ['timestamp', 'd/MMM/yyyy:HH:mm:ss Z', 'dd/MMM/yyyy:HH:mm:ss Z']
tags => ['adc-access']
}
}

When in separate filter scopes like above, only the grok filter gets applied to any input with the tag "adc-access", as opposed to both the grok and date filters. This breaks functionality of logstash. Specific use case was with a standard APACHE access log but this appears to also occur with any grok/date filter that get split up like this When the date filter was copied and pasted into the same filter scope as the grok filter, the two worked successfully on input with a matching tag. . 

boolean validation is wrong

When a boolean is set to 'false' it gets not set in the config file while this is needed.
Change validation to $var != '' for booleans

logstash_user and logstash_group ignored on init.d script

Redhat init.d script does not contain any reference to logstash_user nor logstash_group to start the daemon using these user/group.

By the other hand, current init.d script template for Debian contains:

Run logstash as this user ID and group ID

LS_USER=root
LS_GROUP=root

But should contain:

Run logstash as this user ID and group ID

LS_USER=<%= scope.lookupvar('logstash::logstash_user') %>
LS_GROUP=<%= scope.lookupvar('logstash::logstash_group') %>

default location on ubuntu/debian is /etc/default not /etc/defaults

--- ../testing/logstash/manifests/params.pp 2013-02-11 06:35:49.000000000 +1100
+++ ../development/logstash/manifests/params.pp 2013-02-20 15:10:53.656026288 +1100
@@ -82,7 +82,7 @@
$service_hasrestart = true
$service_hasstatus = true
$service_pattern = $service_name

  •  $defaults_location  = '/etc/defaults'
    
  •  $defaults_location  = '/etc/default'
    
    }
    default: {
    fail(""${module_name}" provides no service parameters

Multi instance feature

Currently working on a feature so we can run multiple instances of logstash on 1 machine.
These can have the same or different configs.

gelf is not working

Hi
i'm trying to use logstash::output::gelf to send logs to graylog2.
my code is:
logstash::output::gelf{"send log to graylog24":
host => "x.x.x.x",
full_message => 'Debug: full message => log from puppet',
port => '12201',
short_message => 'Debug: log from puppet',
require => Class["logstash"],
}

but i'm not able to see anylogs in graylog2
can you help please
thanks

Support for agent vs central

The init file starts logstash with --web and --backend. These are not needed for an agent server talking to a central server.

ensure absent causes some resources to be created

notice: /Stage[main]/Logstash::Service/Logstash::Servicefile[agent]/File[/etc/init.d/logstash-agent]/ensure: current_value absent, should be present (noop)
notice: /Stage[main]/Logstash::Service/Logstash::Servicefile[agent]/File[/etc/sysconfig/logstash-agent]/ensure: current_value absent, should be file (noop)
notice: /Stage[main]/Logstash::Config/Logstash::Configdir[agent]/Exec[create_sincedb_dir_agent]/returns: current_value notrun, should be 0 (noop)
notice: /Stage[main]/Logstash::Config/Logstash::Configdir[agent]/Exec[create_config_dir_agent]/returns: current_value notrun, should be 0 (noop)
notice: /Stage[main]/Logstash::Config/Logstash::Configdir[agent]/File[/etc/logstash/agent/config]/ensure: current_value absent, should be directory (noop)
info: /Stage[main]/Logstash::Config/Logstash::Configdir[agent]/File[/etc/logstash/agent/config]: Scheduling refresh of Service[logstash-agent]
notice: /Stage[main]/Logstash::Service/Logstash::Servicefile[agent]/Service[logstash-agent]: Would have triggered 'refresh' from 1 events
notice: Logstash::Servicefile[agent]: Would have triggered 'refresh' from 3 events
notice: Class[Logstash::Service]: Would have triggered 'refresh' from 1 events
notice: Logstash::Configdir[agent]: Would have triggered 'refresh' from 3 events
notice: Class[Logstash::Config]: Would have triggered 'refresh' from 1 events
notice: /Stage[main]/Logstash::Package/Package[logstash]/ensure: current_value absent, should be purged (noop)
notice: Class[Logstash::Package]: Would have triggered 'refresh' from 1 events
notice: Stage[main]: Would have triggered 'refresh' from 3 events
notice: Finished catalog run in 37.46 seconds

happens when I use 0.1.0 from the Puppet Forge with the following declaration

class{ 'logstash':
    ensure => 'absent',
}

Working on updating for LS 1.2

Im working on updating allot of the code for the Logstash 1.2 release.
Because this requires allot of rewriting it will take a while.

Logstash fails to start with minimal config

If I just include logstash, the logstash-agent service fails to start. There are no config files under /etc/logstash/agent/config. This is with Logstash 1.1.10 on Ubuntu 12.04 and 0.2.0 of the module installed via the puppet module tool. The readme says this is valid usage, but it obviously isn't, since Logstash doesn't have any defined inputs or outputs.

spec testing rewrite

I'm planning to rewrite the whole rspec tests to be more verbose.

Currently i have the following scenario's:

Package

Package ( Defaults )

Package + Service managed + multi-instance enabled + custom defaults files
Package + Service managed + multi-instance enabled + Built in init file
Package + Service managed + multi-instance enabled + Built in init file + custom defaults files
Package + Service managed + multi-instance enabled + custom init file
Package + Service managed + multi-instance enabled + custom init file + custom defaults files

Package + Service managed + multi-instance disabled + custom defaults file
Package + Service managed + multi-instance disabled + Built in init file
Package + Service managed + multi-instance disabled + Built in init file + custom defaults files
Package + Service managed + multi-instance disabled + custom init files
Package + Service managed + multi-instance disabled + custom init files + custom defaults files

Package + Service unmanaged + multi-instance enabled + Built in init file
Package + Service unmanaged + multi-instance enabled + Built in init file + custom defaults files
Package + Service unmanaged + multi-instance enabled + custom init file
Package + Service unmanaged + multi-instance enabled + custom init file + custom defaults files

Package + Service unmanaged + multi-instance disabled + Built in init file
Package + Service unmanaged + multi-instance disabled + Built in init file + custom defaults files
Package + Service unmanaged + multi-instance disabled + custom init files
Package + Service unmanaged + multi-instance disabled + custom init files + custom defaults files

Package + Removal of the module

Jarfile

Jarfile ( Defaults )

Jarfile + Service managed + multi-instance enabled + Custom defaults files
Jarfile + Service managed + multi-instance enabled + Built in init file
Jarfile + Service managed + multi-instance enabled + Built in init file + custom defaults files
Jarfile + Service managed + multi-instance enabled + custom init file
Jarfile + Service managed + multi-instance enabled + custom init file + custom defaults files

Jarfile + Service managed + multi-instance disabled + Custom defaults file
Jarfile + Service managed + multi-instance disabled + Built in init file
Jarfile + Service managed + multi-instance disabled + Built in init file + custom defaults files
Jarfile + Service managed + multi-instance disabled + custom init files
Jarfile + Service managed + multi-instance disabled + custom init files + custom defaults files

Jarfile + Service unmanaged + multi-instance enabled + Built in init file
Jarfile + Service unmanaged + multi-instance enabled + Built in init file + custom defaults files
Jarfile + Service unmanaged + multi-instance enabled + custom init file
Jarfile + Service unmanaged + multi-instance enabled + custom init file + custom defaults files

Jarfile + Service unmanaged + multi-instance disabled + Built in init file
Jarfile + Service unmanaged + multi-instance disabled + Built in init file + custom defaults files
Jarfile + Service unmanaged + multi-instance disabled + custom init files
Jarfile + Service unmanaged + multi-instance disabled + custom init files + custom defaults files

Jarfile + Removal of the module

Java
java + Default package name
java + custom package name

Create tmp dir

(20:28:59) jkoppe: electrical: i needed to mkdir /usr/share/logstash/tmp to avoid https://logstash.jira.com/browse/LOGSTASH-665 when using electrical/puppet-logstash
(20:31:29) electrical: jkoppe, let me take a look at it.. thought i set up /etc/logstash/$instance/tmp for it with the latests module version
(20:31:51) jkoppe: i used the one from the forge
(20:31:56) jkoppe: not sure if that's current
(20:32:23) electrical: its pretty current
(20:32:32) electrical: but ur right. i don't create the dir in my module
(20:32:38) electrical: path is right though..
(20:32:50) electrical: the /usr/share/logstash/tmp
(20:33:02) electrical: can you make an issue in github? will fix it

Puppet apply fails on Service[logstash]

I'm using version 0.2.0 of the puppet-logstash module. I created a .deb of logstash that contains only /var/lib/logstash/logstash.jar; there is no init script.

The entirety of my Logstash config is

include logstash

logstash::input::file { 'var_log':
    type => 'linux-syslog',
    path => ['/var/log/syslog'],
}

logstash::output::elasticsearch_http { 'elasticsearch_http':
    host => "localhost",
}

When I run puppet apply I get a failure:

Error: /Stage[main]/Logstash::Service/Service[logstash]: Could not evaluate: Could not find init script or upstart conf file for 'logstash'

I believe the problem section is this

  # Remove the init file and service from the package if we install it via a package
  if $logstash::provider == 'package' {
    file { '/etc/init.d/logstash':
      ensure => absent
    }

    service { 'logstash':
      ensure => 'stopped',
      enable => false
    }
  }

Even if I did provide an init script, I believe subsequent runs would fail because /etc/init.d/logstash has been deleted. In fact, since there's no relationship between Service['logstash'] and File['/etc/init.d/logstash'], it's likely puppet will attempt to stop the service after the file's been deleted.

/var/lock/subsys/logstash missing

/var/lock/subsys/logstash is not created, when installing using puppet-logstash module, and logstash rpm built from .spec file in logstash source.

Creating that folder - makes it try to start it.

Allow for files required for pugins to be automatically transfered to the host

As result for PR https://github.com/electrical/puppet-logstash/pull/22 creating this issue to track it.

PR elastic/logstash#391 handles the new path validator ( has been merged )
PR elastic/logstash#392 modifies the validation in the plugins.

Change has also been made to the code generator for creating the defines.

In the end you will get this:

logstash::input::lumberjack {
  "whatever":
    ...
    ssl_certificate => "puppet:///modules/something/lumberjack.crt",
    ssl_key => "puppet:///modules/something/lumberjack.key";
}

The files will be placed in a predefined structure and paths will be set correctly to the config files.

Hash serialization is not stable

Given the following filter config:

logstash::filter::mutate {'syslog_mutate_replace':
    order => 130,
    type => 'syslog',
    exclude_tags => ['_grokparsefailure'],
    replace => {
        '@source_host' => '%{syslog_hostname}',
        '@message' => '%{syslog_message}',
    },
}

The generated file can change from run to run of Puppet, causing spurious restarts of the logstash service.

root@vagrant-ubuntu-precise-64:/var/lib/puppet/clientbucket# diff b/5/f/c/1/3/8/7/b5fc1387d7f814fc8114f66e7f51f2ca/contents /etc/logstash/agent/config/filter_130_mutate_syslog_mutate_replace
4c4
<   replace => ["@source_host", "%{syslog_hostname}", "@message", "%{syslog_message}"]

---
>   replace => ["@message", "%{syslog_message}", "@source_host", "%{syslog_hostname}"]

service logstash not starting

Error:

/usr/bin/logstash agent -f /etc/logstash

Exception in thread "LogStash::Runner" org.jruby.exceptions.RaiseException: (NoMethodError) undefined method `each' for nil:NilClass
ruby -v
ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]

with logstash-1.1.13-flatjar.jar

Install config file

I feel like I've seen a way to push out a static config file with this module (rather than the defines), but for the life of me I don't see anything in the manifests that look like it supports it.

If this feature doesn't exist, would you merge a PR supporting putting one in confdir?

Change mode of files to 0640

Requested on IRC to change the mode of the files to 0640 so its not readable for everyone ( security thingy )

gelf is not working

Hi,
I'm trying to use the module to send logs to the graylog2. i'm not getting any error but i'm not able to see any relevnat log in gaylog2
i'm using the following code:

logstash::output::gelf{"send log to graylog24":
host => "x.x.x.x"
full_message => 'Debug: full message => log from puppet',
port => '12201',
short_message => 'Debug: log from puppet',
require => Class["logstash"],
}
can you help please
thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.