diff --git a/manifests/filter.pp b/manifests/filter.pp index 5a4834e..5a8f532 100644 --- a/manifests/filter.pp +++ b/manifests/filter.pp @@ -1,9 +1,46 @@ -# Configure a fluentd filter +# Define: fluentd::filter +# =========================== +# +# Configures a 'filter' config file. +# +# Parameters +# ---------- +# [*ensure*] +# Default: 'present' +# [*priority*] +# Defines the priority +# Default: '20' +# [*pattern*] +# Defines matching the pattern +# Default: '**' +# [*config*] +# Configuration, which must be a hash +# Default: {}' +# +# Examples +# -------- +# +# @example +# ::fluentd::filter { 'test': +# priority => 20, +# pattern => '*.test' +# config => { +# 'type' => 'record_transformer' +# 'record' => { +# 'hostname' => '${hostname}' +# } +# } +# } +# +# Copyright +# --------- +# +# Copyright 2015 wywy GmbH, unless otherwise noted. # define fluentd::filter ( $ensure = present, $priority = 20, - $pattern = '', + $pattern = '**', $config = {}, ) { diff --git a/manifests/init.pp b/manifests/init.pp index d80c538..d6ef544 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -1,7 +1,7 @@ # Class: fluentd # =========================== # -# Full description of class fluentd here. +# Installs and configures Fluentd. # # Parameters # ---------- diff --git a/manifests/match.pp b/manifests/match.pp index 1603535..cad1245 100644 --- a/manifests/match.pp +++ b/manifests/match.pp @@ -1,9 +1,51 @@ -# Configure a fluentd match +# Define: fluentd::match +# =========================== +# +# Configures a 'match' config file. +# +# Parameters +# ---------- +# [*ensure*] +# Default: 'present' +# [*priority*] +# Defines the priority +# Default: '30' +# [*pattern*] +# Defines matching the pattern +# Default: '**' +# [*config*] +# Configuration, which must be a hash +# Default: {}' +# +# Examples +# -------- +# +# @example +# ::fluentd::match { 'test': +# priority => 30, +# pattern => '*.test' +# config => { +# 'flush_interval' => '30s' +# 'type' => 'secure_forward' +# 'secure' => 'yes' +# 'shared_key' => 'my_shared_key' +# 'self_hostname' => 'instance.test.com' +# 'ca_cert_path' => '/path/to/ca.cert' +# 'servers' => { +# 'host' => 'test.server.com' +# } +# } +# } +# +# Copyright +# --------- +# +# Copyright 2015 wywy GmbH, unless otherwise noted. # define fluentd::match ( $ensure = present, $priority = 30, - $pattern = '', + $pattern = '**', $config = {}, ) { diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 9c1d7af..e0811aa 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -1,4 +1,29 @@ -# Install fluentd plugins +# Define: fluentd::plugin +# =========================== +# +# Installs a plugin for fluentd. +# +# Parameters +# ---------- +# [*ensure*] +# Default: 'present' +# [*type*] +# Which type of plugin, allowed values are gem and file +# Default: 'gem' +# [*source*] +# source to file for the plugin only needed if you use type: file +# Default: 'undef' +# +# Examples +# -------- +# +# @example +# ::fluentd::plugin { 'fluent-plugin-elasticsearch': } +# +# Copyright +# --------- +# +# Copyright 2015 wywy GmbH, unless otherwise noted. # define fluentd::plugin ( $ensure = present, diff --git a/manifests/source.pp b/manifests/source.pp index e44d1ca..535c1c6 100644 --- a/manifests/source.pp +++ b/manifests/source.pp @@ -1,4 +1,37 @@ -# Configure a fluentd source +# Define: fluentd::source +# =========================== +# +# Configures a 'source' config file. +# +# Parameters +# ---------- +# [*ensure*] +# Default: 'present' +# [*priority*] +# Defines the priority +# Default: '10' +# [*config*] +# Configuration, which must be a hash +# Default: {}' +# +# Examples +# -------- +# +# @example +# ::fluentd::source { 'test': +# priority => 10, +# config => { +# 'type' => 'tail' +# 'format' => 'json' +# 'path' => '/var/log/test-application/*.json' +# 'tag' => 'application.test' +# } +# } +# +# Copyright +# --------- +# +# Copyright 2015 wywy GmbH, unless otherwise noted. # define fluentd::source ( $ensure = present,