Puppet Class: simp_logstash::input::stdin

Defined in:
manifests/input/stdin.pp

Overview

A Logstash input for stdin

The generic stdin input.

Parameters:

  • order (Integer) (defaults to: '50')

    The relative order within the configuration group. If omitted, the entries will fall in alphabetical order.

  • content (String) (defaults to: '')

    The content that you wish to have in your filter. If set, this will override all template contents.

Author:

  • Trevor Vaughan <tvaughan@onyxpoint.com>



15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'manifests/input/stdin.pp', line 15

class simp_logstash::input::stdin (
  $order = '50',
  $content = ''
){

  validate_integer($order)
  validate_string($content)

  ### Common material to all inputs
  include '::simp_logstash'

  $_component_name = 'stdin'
  $_group = 'input'
  $_group_order = $::simp_logstash::config_order[$_group]

  if empty($content) {
    $_content = template("${module_name}/${_group}/${_component_name}.erb")
  }
  else {
    $_content = $content
  }

  file { "${::simp_logstash::config_prefix}-${_group_order}_${_group}-${order}-${_component_name}${::simp_logstash::config_suffix}":
    ensure  => 'file',
    owner   => 'root',
    group   => $::logstash::logstash_group,
    mode    => '0640',
    content => "input { stdin{ } }\n",
    notify  => Class['logstash::service']
  }
  ### End common material
}