fluent-plugin-concat 2.1.0 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/.github/ISSUE_TEMPLATE.md +19 -0
- data/.travis.yml +13 -4
- data/README.md +13 -1
- data/fluent-plugin-concat.gemspec +1 -1
- data/lib/fluent/plugin/filter_concat.rb +14 -8
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 924dbefdf8b877e70cece4be8eb1386781c5e83b673c50b79a2888661ad7b81b
|
4
|
+
data.tar.gz: 4f441723887e4db4af2a9c5d97003d2fa005b1675b2bd99eff2957252cb809c0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '06209f9201a4fd1d77cfcf9d915bf2f61a8e41b7585616e8b26016769cf47330adcda04449b227c84b9add2e41c3ada9fb0a452a31ba8c22b9ed68b803ad001b'
|
7
|
+
data.tar.gz: e851318a7d25722148975290967d770f82c1ae43bb1c76ad31c6f182eda69fc465d653fb6383b937c7c453d065e0e099ab6a20f652b0f9223fa9785c12b21065
|
@@ -0,0 +1,19 @@
|
|
1
|
+
#### Problem
|
2
|
+
|
3
|
+
...
|
4
|
+
|
5
|
+
#### Steps to replicate
|
6
|
+
|
7
|
+
Provide example config and message
|
8
|
+
|
9
|
+
#### Expected Behavior
|
10
|
+
|
11
|
+
...
|
12
|
+
|
13
|
+
#### Your environment
|
14
|
+
|
15
|
+
* OS version
|
16
|
+
* paste result of ``fluentd --version`` or ``td-agent --version``
|
17
|
+
* plugin version
|
18
|
+
* paste boot log of fluentd or td-agent
|
19
|
+
* paste result of ``fluent-gem list``, ``td-agent-gem list`` or your Gemfile.lock
|
data/.travis.yml
CHANGED
@@ -1,11 +1,20 @@
|
|
1
1
|
sudo: false
|
2
2
|
language: ruby
|
3
3
|
|
4
|
+
notifications:
|
5
|
+
webhooks:
|
6
|
+
urls:
|
7
|
+
secure: NhOBulc3nFAnJrCr9G0/3IGd1pOb/Zk0Wyk9Jqrf7PHnI4mZOIgttGnewZx1sG96NWrs0Braue5vXwFBTrJ60J6EW3+Q33XzhaZR+Q95jEb+5vcdIP69TYs0TgOIiOouo69Y4rIE1ANYuF/1cBfCKxGulpOIKUCW5LYPkyUEwQy+7VccULctCYCha2OYHQau5SUITCQQqZMfYCvZ+9FRubhR+OiiAnwduuzixKm5b2sa2K4lCKy2vsz3JZtjvQ6/7WM5JsipErtuUY2fDlrWSr/9SehRu8LCD119FjV/HcaAffFMokX+8vJm6RLGcyx/0mAejEqaBofqf9vi1KQJKsKuEe8N9IUpoLrl36RYVfDDRNDqm0pSkrz/KaNxSSe5sDNsCFY+uEFhtiPMHJiSlyEA+BVqnUeoM9pSWp3pcTsIHAjq5VGfQ6u9IooUODCASBlOsLuPu+FYEWG3dC3oiOLEIqQ+WywJg2P7I4dJNhyivti5j61czipTGj28ReFiydp5macKabkvAFBvOW8q07QBO4cvjixhr8hiUgMEVdo5y5dqNhLvS182by3OpmtaSQfpuI8QXytiN9629lWzB7qu0Q7Pji/5wSqEuCdaEHjF5uCVYLFE2LaGJdlTLBg9n0vFfFpJXnP1q0nehq2qRs30pNcgkcCKfEIPJgFgCac=
|
8
|
+
on_success: change
|
9
|
+
on_failure: always
|
10
|
+
on_start: never
|
11
|
+
|
4
12
|
rvm:
|
5
|
-
- 2.1
|
6
|
-
- 2.2
|
7
|
-
- 2.3
|
8
|
-
- 2.4.
|
13
|
+
- 2.1
|
14
|
+
- 2.2
|
15
|
+
- 2.3
|
16
|
+
- 2.4.3
|
17
|
+
- 2.5.0
|
9
18
|
|
10
19
|
gemfile:
|
11
20
|
- Gemfile
|
data/README.md
CHANGED
@@ -51,10 +51,12 @@ This is exclusive with `n_lines.`
|
|
51
51
|
**multiline\_end\_regexp**
|
52
52
|
|
53
53
|
The regexp to match ending of multiline.
|
54
|
+
This is exclusive with `n_lines.`
|
54
55
|
|
55
|
-
**continuous\
|
56
|
+
**continuous\_line\_regexp**
|
56
57
|
|
57
58
|
The regexp to match continuous lines.
|
59
|
+
This is exclusive with `n_lines.`
|
58
60
|
|
59
61
|
**stream\_identity\_key**
|
60
62
|
|
@@ -125,6 +127,16 @@ Handle timeout log lines the same as normal logs.
|
|
125
127
|
</label>
|
126
128
|
```
|
127
129
|
|
130
|
+
Handle single line JSON from Docker containers.
|
131
|
+
|
132
|
+
```aconf
|
133
|
+
<filter **>
|
134
|
+
@type concat
|
135
|
+
key message
|
136
|
+
multiline_end_regexp /\\n$/
|
137
|
+
</filter>
|
138
|
+
```
|
139
|
+
|
128
140
|
## Contributing
|
129
141
|
|
130
142
|
1. Fork it
|
@@ -40,20 +40,22 @@ module Fluent::Plugin
|
|
40
40
|
def configure(conf)
|
41
41
|
super
|
42
42
|
|
43
|
-
if @n_lines && @multiline_start_regexp
|
44
|
-
raise Fluent::ConfigError, "n_lines and multiline_start_regexp are exclusive"
|
43
|
+
if @n_lines && (@multiline_start_regexp || @multiline_end_regexp || @continuous_line_regexp)
|
44
|
+
raise Fluent::ConfigError, "n_lines and multiline_start_regexp/multiline_end_regexp/continuous_line_regexp are exclusive"
|
45
45
|
end
|
46
|
-
if @n_lines.nil? && @multiline_start_regexp.nil?
|
47
|
-
raise Fluent::ConfigError, "Either n_lines or multiline_start_regexp is required"
|
46
|
+
if @n_lines.nil? && @multiline_start_regexp.nil? && @multiline_end_regexp.nil?
|
47
|
+
raise Fluent::ConfigError, "Either n_lines or multiline_start_regexp or multiline_end_regexp is required"
|
48
48
|
end
|
49
49
|
|
50
50
|
@mode = nil
|
51
51
|
case
|
52
52
|
when @n_lines
|
53
53
|
@mode = :line
|
54
|
-
when @multiline_start_regexp
|
54
|
+
when @multiline_start_regexp || @multiline_end_regexp
|
55
55
|
@mode = :regexp
|
56
|
-
|
56
|
+
if @multiline_start_regexp
|
57
|
+
@multiline_start_regexp = Regexp.compile(@multiline_start_regexp[1..-2])
|
58
|
+
end
|
57
59
|
if @multiline_end_regexp
|
58
60
|
@multiline_end_regexp = Regexp.compile(@multiline_end_regexp[1..-2])
|
59
61
|
end
|
@@ -161,8 +163,12 @@ module Fluent::Plugin
|
|
161
163
|
return new_es
|
162
164
|
else
|
163
165
|
if @buffer[stream_identity].empty?
|
164
|
-
|
165
|
-
|
166
|
+
if !@multiline_start_regexp
|
167
|
+
@buffer[stream_identity] << [tag, time, record]
|
168
|
+
else
|
169
|
+
new_es.add(time, record)
|
170
|
+
return new_es
|
171
|
+
end
|
166
172
|
else
|
167
173
|
if continuous_line?(record[@key])
|
168
174
|
# Continuation of the previous line
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-concat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kenji Okimoto
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-02-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fluentd
|
@@ -101,6 +101,7 @@ executables: []
|
|
101
101
|
extensions: []
|
102
102
|
extra_rdoc_files: []
|
103
103
|
files:
|
104
|
+
- ".github/ISSUE_TEMPLATE.md"
|
104
105
|
- ".gitignore"
|
105
106
|
- ".rubocop.yml"
|
106
107
|
- ".travis.yml"
|
@@ -133,7 +134,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
133
134
|
version: '0'
|
134
135
|
requirements: []
|
135
136
|
rubyforge_project:
|
136
|
-
rubygems_version: 2.
|
137
|
+
rubygems_version: 2.7.3
|
137
138
|
signing_key:
|
138
139
|
specification_version: 4
|
139
140
|
summary: Fluentd Filter plugin to concat multiple event messages
|