1
0
mirror of https://github.com/krislamo/puppet-fluentd synced 2024-09-20 04:30:36 +00:00
puppet-fluentd/manifests/filter.pp

54 lines
1.0 KiB
ObjectPascal
Raw Normal View History

# 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,
2015-12-04 11:54:07 +00:00
# pattern => '*.test',
# config => {
2015-12-04 11:54:07 +00:00
# 'type' => 'record_transformer',
# 'record' => {
# 'hostname' => '${hostname}'
# }
# }
# }
#
# Copyright
# ---------
#
2017-08-10 12:24:22 +00:00
# Copyright 2015 wywy, unless otherwise noted.
2015-12-01 13:18:37 +00:00
#
define fluentd::filter (
Enum['present', 'absent'] $ensure = present,
Integer $priority = 20,
String $pattern = '**',
Hash $config = {},
2015-12-01 13:18:37 +00:00
) {
2015-12-01 13:18:37 +00:00
fluentd::config::file { "filter-${title}":
ensure => $ensure,
priority => $priority,
content => template( 'fluentd/filter.erb'),
}
2015-12-01 13:18:37 +00:00
}