Defined Type: logstash::input::udp

Defined in:
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'.

  • $plugin_id: Name associated with Logstash metrics

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)
  • plugin_id (Any) (defaults to: "input/udp/${port}")
  • tags (Any) (defaults to: undef)


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

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