mirror of
https://github.com/krislamo/puppet-fluentd
synced 2025-09-13 00:49:29 +00:00
Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
540ef4e40d | ||
|
d92ea1e849 | ||
|
59fb7919a2 | ||
|
29122932ef | ||
|
72e6bcd744 |
20
README.md
20
README.md
@@ -1,6 +1,6 @@
|
||||
# wywy/fluentd Puppet Module
|
||||
# pilchkinstein-gtv/fluentd Puppet Module
|
||||
|
||||
[](https://github.com/wywy/puppet-fluentd)
|
||||
[](https://github.com/pilchkinstein-gtv/puppet-fluentd)
|
||||
[](https://travis-ci.org/wywy/puppet-fluentd)
|
||||
|
||||
|
||||
@@ -131,6 +131,14 @@ include '::fluentd'
|
||||
'type' => 'tail',
|
||||
'format' => 'json',
|
||||
'path' => '/var/log/test-application/*.json',
|
||||
'parse' => {
|
||||
'type' => 'regexp',
|
||||
'expression' => '^(?<name>[^ ]*) (?<user>[^ ]*) (?<age>\d*)$'
|
||||
},
|
||||
'storage'=> {
|
||||
'type' => 'local',
|
||||
'path' => 'test.pos'
|
||||
},
|
||||
'tag' => 'application.test'
|
||||
}
|
||||
}
|
||||
@@ -142,6 +150,14 @@ include '::fluentd'
|
||||
type tail
|
||||
format json
|
||||
path /var/log/test-application/*.json
|
||||
<parse>
|
||||
type regexp
|
||||
expression ^(?<name>[^ ]*) (?<user>[^ ]*) (?<age>\d*)$
|
||||
</parse>
|
||||
<storage>
|
||||
type local
|
||||
path test.pos
|
||||
</storage>
|
||||
tag application.test
|
||||
</source>
|
||||
```
|
||||
|
@@ -2,9 +2,17 @@
|
||||
::fluentd::source { 'test':
|
||||
priority => 10,
|
||||
config => {
|
||||
'type' => 'tail',
|
||||
'format' => 'json',
|
||||
'path' => '/var/log/test-application/*.json',
|
||||
'tag' => 'application.test'
|
||||
'type' => 'tail',
|
||||
'format' => 'json',
|
||||
'path' => '/var/log/test-application/*.json',
|
||||
'parse' => {
|
||||
'type' => 'regexp',
|
||||
'expression' => '^(?<name>[^ ]*) (?<user>[^ ]*) (?<age>\d*)$'
|
||||
},
|
||||
'storage' => {
|
||||
'type' => 'local',
|
||||
'path' => 'test.pos'
|
||||
},
|
||||
'tag' => 'application.test'
|
||||
}
|
||||
}
|
||||
|
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "wycore-fluentd",
|
||||
"name": "pilchkinstein-fluentd",
|
||||
"version": "1.0.0",
|
||||
"author": "wywy",
|
||||
"author": "pilchkinstein-gtv",
|
||||
"summary": "Generic module for fluentd (td-agent).",
|
||||
"license": "Apache-2.0",
|
||||
"source": "https://github.com/wycore/puppet-fluentd",
|
||||
"project_page": "https://github.com/wycore/puppet-fluentd",
|
||||
"issues_url": "https://github.com/wycore/puppet-fluentd/issues",
|
||||
"source": "https://github.com/pilchkinstein-gtv/puppet-fluentd",
|
||||
"project_page": "https://github.com/pilchkinstein-gtv/puppet-fluentd",
|
||||
"issues_url": "https://github.com/pilchkinstein-gtv/puppet-fluentd/issues",
|
||||
"tags": ["fluentd", "td-agent"],
|
||||
"operatingsystem_support": [
|
||||
{
|
||||
|
@@ -18,6 +18,14 @@ describe 'fluentd::source' do
|
||||
'type' => 'tail',
|
||||
'format' => 'json',
|
||||
'path' => '/var/log/test-application/*.json',
|
||||
'parse' => {
|
||||
'type' => 'regexp',
|
||||
'expression' => '^(?<name>[^ ]*) (?<user>[^ ]*) (?<age>\d*)$'
|
||||
},
|
||||
'storage'=> {
|
||||
'type' => 'local',
|
||||
'path' => 'test.pos'
|
||||
},
|
||||
'tag' => 'application.test'
|
||||
}
|
||||
}
|
||||
|
8
spec/fixtures/files/source_tail.conf
vendored
8
spec/fixtures/files/source_tail.conf
vendored
@@ -2,5 +2,13 @@
|
||||
type tail
|
||||
format json
|
||||
path /var/log/test-application/*.json
|
||||
<parse>
|
||||
type regexp
|
||||
expression ^(?<name>[^ ]*) (?<user>[^ ]*) (?<age>\d*)$
|
||||
</parse>
|
||||
<storage>
|
||||
type local
|
||||
path test.pos
|
||||
</storage>
|
||||
tag application.test
|
||||
</source>
|
||||
|
@@ -1,5 +1,13 @@
|
||||
<source>
|
||||
<% @config.each do |key, val| -%>
|
||||
<%- if val.is_a?( Hash ) -%>
|
||||
<<%= key -%>>
|
||||
<%- val.each do |key2, val2| -%>
|
||||
<%= key2 -%> <%= val2 %>
|
||||
<%- end -%>
|
||||
</<%= key %>>
|
||||
<%- else -%>
|
||||
<%= key -%> <%= val %>
|
||||
<%- end -%>
|
||||
<% end -%>
|
||||
</source>
|
||||
|
Reference in New Issue
Block a user