Defined Type: logstash::input::udp

Defined in:
puppet/modules/logstash/manifests/input/udp.pp

Overview

Define: logstash::input::udp

Configure logstash to collect input via UDP and the json codec.

Parameters:

  • $ensure: Whether the config should exist. Default 'present'.

  • $type: Type field to add to all events. Default $title.

  • $port: Port to listen for udp2log input on. Default '11514'.

  • $codec: Codec to decode tcp stream input. Default 'plain'.

  • $priority: Configuration loading priority. Default '10'.

Sample usage:

logstash::input::udp { 'logback':
    port  => 11514,
    codec => 'json',
}

Parameters:

  • ensure (Any) (defaults to: present)
  • type (Any) (defaults to: $title)
  • port (Any) (defaults to: 11514)
  • codec (Any) (defaults to: 'plain')
  • priority (Any) (defaults to: 10)


21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'puppet/modules/logstash/manifests/input/udp.pp', line 21

define logstash::input::udp(
    $ensure   = present,
    $type     = $title,
    $port     = 11514,
    $codec    = 'plain',
    $priority = 10,
) {
    logstash::conf { "input-udp-${title}":
        ensure   => $ensure,
        content  => template('logstash/input/udp.erb'),
        priority => $priority,
    }
}