Puppet Class: profile::rsyslog::udp_tee

Defined in:
modules/profile/manifests/rsyslog/udp_tee.pp

Overview

Parameters:

  • listen (String) (defaults to: lookup('profile::rsyslog::udp_tee::listen', {'default_value' => '0.0.0.0:8420'}))
  • destinations (Array[String]) (defaults to: lookup('profile::rsyslog::udp_tee::destinations', {'default_value' => ['localhost:8421']}))


8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'modules/profile/manifests/rsyslog/udp_tee.pp', line 8

class profile::rsyslog::udp_tee (
    String $listen = lookup('profile::rsyslog::udp_tee::listen', {'default_value' => '0.0.0.0:8420'}),
    Array[String] $destinations = lookup('profile::rsyslog::udp_tee::destinations', {'default_value' => ['localhost:8421']}),
) {
    $listen_host = split($listen, ':')[0]
    $listen_port = split($listen, ':')[1]

    rsyslog::conf { 'udp_tee':
        content  => template('profile/rsyslog/udp_tee.conf.erb'),
        priority => 50,
    }

    # disable escaping of control chars to avoid breaking the formatting of multi-line logs like tracebacks
    rsyslog::conf { 'escape_control_characters_on_receive.conf':
        ensure   => present,
        content  => template('profile/rsyslog/escape_control_characters_on_receive.conf.erb'),
        priority => 00,
    }

    ferm::service { "rsyslog_udp_tee_${listen_port}":
        proto  => 'udp',
        port   => $listen_port,
        srange => '$DOMAIN_NETWORKS',
    }
}