mirror of
https://github.com/krislamo/puppet-fluentd
synced 2024-11-09 20:50:34 +00:00
added examples to examples folder
This commit is contained in:
parent
c1de2cb703
commit
89c98b79d6
11
examples/filter.pp
Normal file
11
examples/filter.pp
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# configure filter
|
||||||
|
::fluentd::filter { 'test':
|
||||||
|
priority => 20,
|
||||||
|
pattern => '*.test',
|
||||||
|
config => {
|
||||||
|
'type' => 'record_transformer',
|
||||||
|
'record' => {
|
||||||
|
'hostname' => '${hostname}'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,12 +1,2 @@
|
|||||||
# The baseline for module testing used by Puppet Labs is that each manifest
|
# base installation and config
|
||||||
# should have a corresponding test manifest that declares that class or defined
|
include '::fluentd'
|
||||||
# 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
|
|
||||||
|
16
examples/match.pp
Normal file
16
examples/match.pp
Normal 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
9
examples/plugin.pp
Normal 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
10
examples/source.pp
Normal 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'
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user