Puppet Class: puppetmaster::logstash

Defined in:
modules/puppetmaster/manifests/logstash.pp

Overview

Class: puppetmaster::logstash

Deploy and configure a puppet reporter to send reports to logstash.

This results in the full diff of the Puppet run being stored in Logstash. As such, care should be taken in ensuring that the target logstash cluster is properly secured for types of sensitive data that this may reveal.

Parameters

  • logstash_host: Host to send log events to

  • logstash_port: Port to send log events to

  • timeout: Connection timeout for sending an event in seconds. Default is 5.

Parameters:

  • logstash_host (Any)
  • logstash_port (Any)
  • timeout (Any) (defaults to: 5)


13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'modules/puppetmaster/manifests/logstash.pp', line 13

class puppetmaster::logstash(
    $logstash_host,
    $logstash_port,
    $timeout = 5,
) {
    file { '/etc/puppet/logstash.yaml':
        ensure  => present,
        owner   => 'puppet',
        group   => 'puppet',
        mode    => '0444',
        content => template('puppetmaster/logstash.yaml.erb'),
    }

    base::puppet::config { 'logstash':
        prio    => 30,
        content => template('puppetmaster/logstash.conf.erb'),
    }
}