Puppet Class: role::logstash::puppetreports

Defined in:
modules/role/manifests/logstash/puppetreports.pp

Overview

vim:sw=4 ts=4 sts=4 et:

Class: role::logstash::puppetreports

Set up a TCP listener to listen for puppet failure reports.

filtertags: labs-project-deployment-prep



7
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/role/manifests/logstash/puppetreports.pp', line 7

class role::logstash::puppetreports {
    require ::role::logstash::collector

    if $::realm != 'labs' {
        # Constrain to only labs, security issues in prod have not been worked out yet
        fail('role::logstash::puppetreports may only be deployed to Labs.')
    }

    logstash::input::tcp { 'tcp_json':
        port  => 5229,
        codec => 'json_lines',
    }

    ferm::service { 'logstash_tcp_json':
        proto  => 'tcp',
        port   => '5229',
        srange => '$DOMAIN_NETWORKS',
    }

    # lint:ignore:puppet_url_without_modules
    logstash::conf { 'filter_puppet':
        source   => 'puppet:///modules/role/logstash/filter-puppet.conf',
        priority => 50,
    }
    # lint:endignore
}