Forge Home

logstash

Module for managing logstash

13,422 downloads

10,821 latest version

3.8 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Support the Puppet Community by contributing to this module

You are welcome to contribute to this module by suggesting new features, currency updates, or fixes. Every contribution is valuable to help ensure that the module remains compatible with the latest Puppet versions and continues to meet community needs. Complete the following steps:

  1. Review the module’s contribution guidelines and any licenses. Ensure that your planned contribution aligns with the author’s standards and any legal requirements.
  2. Fork the repository on GitHub, make changes on a branch of your fork, and submit a pull request. The pull request must clearly document your proposed change.

For questions about updating the module, contact the module’s author.

Version information

  • 0.1.6 (latest)
  • 0.1.5
  • 0.1.4
  • 0.1.3
  • 0.1.2
  • 0.1.0
  • 0.0.3
  • 0.0.2
  • 0.0.1
released Dec 25th 2012

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'garethr-logstash', '0.1.6'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add garethr-logstash
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install garethr-logstash --version 0.1.6

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

garethr/logstash — version 0.1.6 Dec 25th 2012

A puppet module for managing logstash indexers and shippers

Build Status

Also available via on the Puppet Forge at garethr/logstash

Tested on Ubuntu 12.04 Precise but should work elsewhere.

Usage

Logstash indexer

To install the logstash indexer on a node, add the following to your node manifest:

node 'node01.example.org' {
  include 'logstash::indexer'
}

With parameters:

node 'node01.example.org' {
  class { 'logstash::indexer':
    workers => 4,
  }
}

We default the workers to 1 but if you have lots of filters and more than a single CPU then experimenting with this should help performance.

Until I find time to provide more ways of configuring logstash you can just override the configuration file like so:

  class { 'logstash::indexer':
    config  => 'puppet:///path/to/config/file.conf',
  }

The default indexer configuration is really for demo purposes, it uses the built-in elasticsearch server and automatically starts up the web application too. You can disable that behaviour with. If you have an elasticsearch server elsewhere you can use the web_backend parameter to specify the connection string.

  class { 'logstash::indexer':
    web_backend => false,
  }

Logstash shipper

To install the logstash shipper on a node, add the following to your node manifest:

node 'node01.example.org' {
  include 'logstash::shipper'
}

With parameters:

node 'node01.example.org' {
  class { 'logstash::shipper':
    workers => 4,
    config  => 'puppet:///path/to/config/file.conf',
  }

}

Configuration

I've added some defined types to manage configuration, so you can now do:

logstash::shipper::config { 'auth':
  content => 'input { file { type => "auth" path => [

"/var/log/auth.log" ] } }' }

Alternatively you can provide a source path:

logstash::shipper::config { 'auth':
  source  => 'puppet:///path/to/config/file.conf',
}

This works for the indexer too, using logstash::indexer::config.

Dependencies

This module currently has a hard coded configuration for demonstration purposes. It requires Redis which could be installed via this module. The configuration takes input from syslog and saves it to files in /var/log/logstash.

Credit

This module started out as a fork of puppet-logstash