1
0
mirror of https://github.com/krislamo/puppet-fluentd synced 2024-09-19 20:20:35 +00:00

added examples to examples folder

This commit is contained in:
Max Wilhelm 2015-12-07 13:23:41 +01:00
parent c1de2cb703
commit 89c98b79d6
5 changed files with 48 additions and 12 deletions

11
examples/filter.pp Normal file
View File

@ -0,0 +1,11 @@
# configure filter
::fluentd::filter { 'test':
priority => 20,
pattern => '*.test',
config => {
'type' => 'record_transformer',
'record' => {
'hostname' => '${hostname}'
}
}
}

View File

@ -1,12 +1,2 @@
# The baseline for module testing used by Puppet Labs is that each manifest
# should have a corresponding test manifest that declares that class or defined
# type.
#
# Tests are then run by using puppet apply --noop (to check for compilation
# errors and view a log of events) or by fully applying the test in a virtual
# environment (to compare the resulting system state to the desired state).
#
# Learn more about module testing here:
# http://docs.puppetlabs.com/guides/tests_smoke.html
#
include fluentd
# base installation and config
include '::fluentd'

16
examples/match.pp Normal file
View File

@ -0,0 +1,16 @@
# configure match
::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'
}
}
}

9
examples/plugin.pp Normal file
View File

@ -0,0 +1,9 @@
# gem installation
::fluentd::plugin { 'fluent-plugin-elasticsearch':
type => 'gem'
}
# file installation
::fluentd::plugin { 'fluent-plugin-elasticsearch':
type => 'file',
source => 'puppet:///path/to/plugin'
}

10
examples/source.pp Normal file
View File

@ -0,0 +1,10 @@
# configure source
::fluentd::source { 'test':
priority => 10,
config => {
'type' => 'tail',
'format' => 'json',
'path' => '/var/log/test-application/*.json',
'tag' => 'application.test'
}
}