rsyslog

Defined typed based management of rsyslog.
Kristopher Kirkland

Kristopher Kirkland

asciiduck

11,602 downloads

11,344 latest version

4.5 quality score

Version information

  • 0.1.1 (latest)
  • 0.1.0
released Jul 3rd 2019
This version is compatible with:
  • Debian
    ,
    RedHat

Start using this module

Documentation

asciiduck/rsyslog — version 0.1.1 Jul 3rd 2019

Table of Contents

  1. Overview
  2. Setup - The basics of getting started with rsyslog
  3. Usage - Configuration options and additional functionality
  4. Reference - An under-the-hood peek at what the module is doing and how
  5. Limitations - OS compatibility, etc.

Overview

This module presents a more flexible, if not yet feature parity, alternative to other rsyslog modules on the forge currently. The biggest gain is the defined types which allow more flexibility in adding logging rules.

Setup

What rsyslog affects

  • /etc/rsyslog.conf
  • /etc/rsyslog.d/
  • rsyslog run directory

Setup Requirements

No current special requirements, other than puppetlabs/stdlib

Beginning with rsyslog

The main class will create a very basic configuration with no rules.

include 'rsyslog'

To make use of the default rules for your OS you should also use include rsyslog::default_configuration

include 'rsyslog'
include 'rsyslog::default\_configuration'

Usage

To add new rule to log to a file

rsyslog::rule{'user7':
  pattern => 'user7.\*',
  file    => '/var/log/user7.log',
}

To add new rule to log to a remote host, you must provide at least the host and the protocol. The protocol may be one of three options, 'udp', 'tcp', or 'tcpo' (TCP with octet framing).

rsyslog::rule{'user7':
  pattern => 'user7.\*',
  host    => 'logger.example.com',
  proto   => 'udp'
}

Reference

Limitations

Currently no overt support for more complicated configurations, like TLS.

Development

Do the usual fork/commit/pull request shuffle. Be sure to keep tests up to date.