fluent-plugin-filter_keys 0.0.2 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +6 -2
- data/README.md +1 -1
- data/fluent-plugin-filter_keys.gemspec +3 -2
- data/lib/fluent/plugin/out_filter_keys.rb +7 -2
- metadata +28 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 01d9d46edf48fb7ee09aead0ca4e375c1db7aff9
|
4
|
+
data.tar.gz: 196671556df0d757fc95ec13cea0e576fe1da4b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d20ea885c0e3063729273bb0a868950512f164552cba6e08cf9a11a97963d07b0243d77c41120d6431a40e3fdce61533ceb359d36ced90fb52fb9b4dc9f0bfa8
|
7
|
+
data.tar.gz: '019a04b94a03d82bf88bcbfdb075b9a2c1deb9865d24b814dd6349f422139511b66a36d946eb4a2dcc66721f3fdba4c22fb99286dd6eec76674e88a6c0a857df'
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |spec|
|
2
2
|
spec.name = "fluent-plugin-filter_keys"
|
3
|
-
spec.version = "0.0
|
3
|
+
spec.version = "0.1.0"
|
4
4
|
spec.authors = ["Kohei Hasegawa"]
|
5
5
|
spec.email = ["ameutau@gmail.com"]
|
6
6
|
spec.description = %q{Fluentd plugin to filter if a specific key is present or not in event logs.}
|
@@ -13,7 +13,8 @@ Gem::Specification.new do |spec|
|
|
13
13
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
14
14
|
spec.require_paths = ["lib"]
|
15
15
|
|
16
|
+
spec.add_dependency "fluentd"
|
16
17
|
spec.add_development_dependency "bundler"
|
17
18
|
spec.add_development_dependency "rake"
|
18
|
-
spec.add_development_dependency "
|
19
|
+
spec.add_development_dependency "test-unit"
|
19
20
|
end
|
@@ -4,6 +4,11 @@ module Fluent
|
|
4
4
|
class FilterKeysOutput < Output
|
5
5
|
include Fluent::HandleTagNameMixin
|
6
6
|
|
7
|
+
# Define `router` method of v0.12 to support v0.10 or earlier
|
8
|
+
unless method_defined?(:router)
|
9
|
+
define_method("router") { Fluent::Engine }
|
10
|
+
end
|
11
|
+
|
7
12
|
Fluent::Plugin.register_output('filter_keys', self)
|
8
13
|
|
9
14
|
config_param :ensure_keys, :string, :default => nil
|
@@ -29,9 +34,9 @@ module Fluent
|
|
29
34
|
t = tag.dup
|
30
35
|
filter_record(t, time, record)
|
31
36
|
if ensure_keys_in?(record) || denied_keys_not_in?(record)
|
32
|
-
|
37
|
+
router.emit(t, time, record)
|
33
38
|
else
|
34
|
-
|
39
|
+
router.emit("#{DISCARD_TAG}.#{t}", time, record) if @add_tag_and_reemit
|
35
40
|
end
|
36
41
|
}
|
37
42
|
|
metadata
CHANGED
@@ -1,55 +1,69 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-filter_keys
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kohei Hasegawa
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-10-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: fluentd
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: bundler
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
16
30
|
requirements:
|
17
|
-
- -
|
31
|
+
- - ">="
|
18
32
|
- !ruby/object:Gem::Version
|
19
33
|
version: '0'
|
20
34
|
type: :development
|
21
35
|
prerelease: false
|
22
36
|
version_requirements: !ruby/object:Gem::Requirement
|
23
37
|
requirements:
|
24
|
-
- -
|
38
|
+
- - ">="
|
25
39
|
- !ruby/object:Gem::Version
|
26
40
|
version: '0'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: rake
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
30
44
|
requirements:
|
31
|
-
- -
|
45
|
+
- - ">="
|
32
46
|
- !ruby/object:Gem::Version
|
33
47
|
version: '0'
|
34
48
|
type: :development
|
35
49
|
prerelease: false
|
36
50
|
version_requirements: !ruby/object:Gem::Requirement
|
37
51
|
requirements:
|
38
|
-
- -
|
52
|
+
- - ">="
|
39
53
|
- !ruby/object:Gem::Version
|
40
54
|
version: '0'
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
56
|
+
name: test-unit
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
44
58
|
requirements:
|
45
|
-
- -
|
59
|
+
- - ">="
|
46
60
|
- !ruby/object:Gem::Version
|
47
61
|
version: '0'
|
48
62
|
type: :development
|
49
63
|
prerelease: false
|
50
64
|
version_requirements: !ruby/object:Gem::Requirement
|
51
65
|
requirements:
|
52
|
-
- -
|
66
|
+
- - ">="
|
53
67
|
- !ruby/object:Gem::Version
|
54
68
|
version: '0'
|
55
69
|
description: Fluentd plugin to filter if a specific key is present or not in event
|
@@ -60,8 +74,8 @@ executables: []
|
|
60
74
|
extensions: []
|
61
75
|
extra_rdoc_files: []
|
62
76
|
files:
|
63
|
-
- .gitignore
|
64
|
-
- .travis.yml
|
77
|
+
- ".gitignore"
|
78
|
+
- ".travis.yml"
|
65
79
|
- Gemfile
|
66
80
|
- LICENSE.txt
|
67
81
|
- README.md
|
@@ -80,21 +94,20 @@ require_paths:
|
|
80
94
|
- lib
|
81
95
|
required_ruby_version: !ruby/object:Gem::Requirement
|
82
96
|
requirements:
|
83
|
-
- -
|
97
|
+
- - ">="
|
84
98
|
- !ruby/object:Gem::Version
|
85
99
|
version: '0'
|
86
100
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
87
101
|
requirements:
|
88
|
-
- -
|
102
|
+
- - ">="
|
89
103
|
- !ruby/object:Gem::Version
|
90
104
|
version: '0'
|
91
105
|
requirements: []
|
92
106
|
rubyforge_project:
|
93
|
-
rubygems_version: 2.
|
107
|
+
rubygems_version: 2.5.2
|
94
108
|
signing_key:
|
95
109
|
specification_version: 4
|
96
110
|
summary: Fluentd plugin to filter if a specific key is present or not in event logs.
|
97
111
|
test_files:
|
98
112
|
- test/plugin/test_out_filter_keys.rb
|
99
113
|
- test/test_helper.rb
|
100
|
-
has_rdoc:
|