Forge Home

syslog_ng

This Module configures syslog-ng

8,331 downloads

8,190 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.

Version information

  • 0.1.1 (latest)
  • 0.1.0
released Aug 5th 2016

Start using this module

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

Add this module to your Puppetfile:

mod 'norisnetwork-syslog_ng', '0.1.1'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add norisnetwork-syslog_ng
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install norisnetwork-syslog_ng --version 0.1.1

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
Tags: syslog-ng

Documentation

norisnetwork/syslog_ng — version 0.1.1 Aug 5th 2016

puppet-syslog_ng

The syslog_ng puppet module installes and configures syslog_ng. The goal is to support the most complex configurations and compile them into a nice, easy to read, single configuration file.

Usage

To build your configuration, you'll need the main class, and at least one source, destination and log statement.

Here is an example for a simple configuation logging everything to /var/log/messages:

Load the main class.

  import syslog_ng

Create a source:

  syslog_ng::source {'s_src':
    definition => 'internal(); unix-stream("/dev/log" max-connections(1024)); file("/proc/kmsg" program_override("kernel: "));',
  }

Create a destination:

  syslog_ng::destination {'d_messages':
    definition => 'file("/var/log/messages");',
  }

Link them together with a log statement:

  syslog_ng::log {'messages':
    sources      => [ 's_src' ],
    destinations => [ 'd_messages' ]',
  }

You can allso create filter definitions with:

  syslog_ng::filter {'f_sshd':
    definition => 'program(sshd);',
  }

and add this filter to a log statement:

  syslog_ng::log {'sshd':
    sources      => [ 's_src' ],
    filters      => [ 'f_sshd' ]',
    destinations => [ 'd_sshd' ]',
  }