Skip to content

Installs, configures, and runs the beaver service to ship logfile to logstash.

License

Notifications You must be signed in to change notification settings

evenup/evenup-beaver

Repository files navigation

What is it?

Puppet module install and configure beaver for shipping logs to logstash. Currently only redis is supported as the transport, but it would be easy to support additional transports.

Note: Beaver 29 or greater is now required because of the switch to conf.d style config

Usage:

You an install the module by just defining a logfile you'd like to ship if the beaver defaults work for you.

Example configuration with manifests

  beaver::stanza { '/var/log/messages':
    type    => 'syslog',
    tags    => ['messages', 'prod'],
  }

If beaver configuration is required, just specify it in the class:

  class { 'beaver':
    redis_host      => 'logstash.example.org',
    redis_namespace => 'logstash::prod'
  }

Example configuration with hiera

+Here it is assumed that the classes are loaded from hiera automatically (more info on puppetlabs).

---
classes:
  - beaver
  - beaver::stanzas
  
beaver::stanzas:
  /var/log/messages:
     type: 'tomcat'
     tags:
      - 'messages'
      - 'prod'

beaver::redis_host: 'redis-host.domain'
beaver::redis_namespace: 'logstash'
beaver::logstash_version: '1'

TODO:
-----
[] Support additional transports
[] Support adding environment fields
[] Add init file for Ubuntu systems

License:
--------
Released under the Apache 2.0 licence

Contribute:
-----------
* Fork it
* Create a topic branch
* Improve/fix (with spec tests)
* Push new topic branch
* Submit a PR

About

Installs, configures, and runs the beaver service to ship logfile to logstash.

Resources

License

Stars

Watchers

Forks

Packages

No packages published