fluent-plugin-stats-notifier 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 67d26005468f638f64088219bbd2b412a526025f
4
- data.tar.gz: ad90655b0724642ba1aea652fc0ba7d31a7d139e
3
+ metadata.gz: 985370532ba3fc6ebcaa9495bdfbbde375becf8d
4
+ data.tar.gz: 3a18b0db66da211900c69983c8985a8d57a5daf0
5
5
  SHA512:
6
- metadata.gz: 5d4dce4153badaab3416e4d7a096065379aec55397b050bae2a73fb0c96c027411fcf060263fc3914e3ecde2acc05cc9b33bc39c674912ed308f173ba115c959
7
- data.tar.gz: 960d59b06a22a0779c755d41e7c8e78e8ccef9641ce4f3de6963c8ec45ee3a541195ad4ee51c14e9007ce4dac21ac962246b593142f75a110db7a56a34fd11cd
6
+ metadata.gz: 7bf792d98204eda7f15eeb163fd46336287241bc65c2b67e781abf6e4863849810fbf94e85ba05e9fa54918bb099ae83cf591a6340ca7723b7ff1da1d80835f1
7
+ data.tar.gz: b1136f5a9c8aa7c49b99be10fab25dfe93d447fb7978b537eba071528fb023cbc3b040223148f41f723b7bcd7b106c82f55084ebd7ae5d9b9eb84ff6e84d23f9
@@ -1,6 +1,10 @@
1
1
  rvm:
2
- - 1.9.3
3
- - 2.0.0
4
2
  - 2.1.*
3
+ - 2.2.*
4
+ - 2.3.0
5
5
  gemfile:
6
6
  - Gemfile
7
+ - Gemfile.v0.10
8
+ - Gemfile.v0.12
9
+ before_install:
10
+ - gem update bundler
@@ -1,3 +1,10 @@
1
+ ## 0.0.5 (2017-09-15)
2
+
3
+ Enchancements:
4
+
5
+ * Support Fluentd v0.14
6
+ * Support label feature
7
+
1
8
  ## 0.0.4
2
9
 
3
10
  Enchancements:
@@ -0,0 +1,4 @@
1
+ source "http://rubygems.org"
2
+
3
+ gemspec
4
+ gem 'fluentd', '~> 0.10.0'
@@ -0,0 +1,4 @@
1
+ source "http://rubygems.org"
2
+
3
+ gemspec
4
+ gem 'fluentd', '~> 0.12.0'
@@ -0,0 +1,18 @@
1
+ <source>
2
+ type dummy
3
+ tag dummy
4
+ dummy {"4xx_count":1,"foobar":"2"}
5
+ </source>
6
+
7
+ <match dummy>
8
+ type stats_notifier
9
+ tag notifier
10
+ interval 3
11
+ target_key 4xx_count
12
+ greater_equal 2
13
+ stats sum
14
+ </match>
15
+
16
+ <match notifier>
17
+ type stdout
18
+ </match>
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "fluent-plugin-stats-notifier"
6
- s.version = "0.0.4"
6
+ s.version = "0.0.5"
7
7
  s.authors = ["Naotoshi Seo"]
8
8
  s.email = ["sonots@gmail.com"]
9
9
  s.homepage = "https://github.com/sonots/fluent-plugin-stats-notifier"
@@ -23,4 +23,5 @@ Gem::Specification.new do |s|
23
23
  s.add_development_dependency "rspec"
24
24
  s.add_development_dependency "pry"
25
25
  s.add_development_dependency "pry-nav"
26
+ s.add_development_dependency "test-unit"
26
27
  end
@@ -7,6 +7,11 @@ class Fluent::StatsNotifierOutput < Fluent::Output
7
7
  define_method("log") { $log }
8
8
  end
9
9
 
10
+ # Define `router` method of v0.12 to support v0.10 or earlier
11
+ unless method_defined?(:router)
12
+ define_method("router") { Fluent::Engine }
13
+ end
14
+
10
15
  def initialize
11
16
  super
12
17
  require 'pathname'
@@ -174,13 +179,13 @@ class Fluent::StatsNotifierOutput < Fluent::Output
174
179
  values = evented_queues.values.map {|queue| queue[@target_key] }.compact
175
180
  value = get_stats(values, @aggregate_stats)
176
181
  output = generate_output(value) if value
177
- Fluent::Engine.emit(@tag, time, output) if output
182
+ router.emit(@tag, time, output) if output
178
183
  else # aggregate tag
179
184
  evented_queues.each do |tag, queue|
180
185
  value = queue[@target_key]
181
186
  output = generate_output(value) if value
182
187
  emit_tag = @tag_proc.call(tag)
183
- Fluent::Engine.emit(emit_tag, time, output) if output
188
+ router.emit(emit_tag, time, output) if output
184
189
  end
185
190
  end
186
191
  end
metadata CHANGED
@@ -1,83 +1,97 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-stats-notifier
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Naotoshi Seo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-12 00:00:00.000000000 Z
11
+ date: 2017-09-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fluentd
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: pry
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '>='
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - '>='
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: pry-nav
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - '>='
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - '>='
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: test-unit
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
81
95
  - !ruby/object:Gem::Version
82
96
  version: '0'
83
97
  description: Fluentd plugin to calculate statistics and then thresholding
@@ -87,15 +101,18 @@ executables: []
87
101
  extensions: []
88
102
  extra_rdoc_files: []
89
103
  files:
90
- - .coveralls.yml
91
- - .gitignore
92
- - .rdebugrc
93
- - .rspec
94
- - .travis.yml
104
+ - ".coveralls.yml"
105
+ - ".gitignore"
106
+ - ".rdebugrc"
107
+ - ".rspec"
108
+ - ".travis.yml"
95
109
  - CHANGELOG.md
96
110
  - Gemfile
111
+ - Gemfile.v0.10
112
+ - Gemfile.v0.12
97
113
  - README.md
98
114
  - Rakefile
115
+ - example.conf
99
116
  - fluent-plugin-stats-notifier.gemspec
100
117
  - lib/fluent/plugin/out_stats_notifier.rb
101
118
  - spec/out_stats_notifier_spec.rb
@@ -110,17 +127,17 @@ require_paths:
110
127
  - lib
111
128
  required_ruby_version: !ruby/object:Gem::Requirement
112
129
  requirements:
113
- - - '>='
130
+ - - ">="
114
131
  - !ruby/object:Gem::Version
115
132
  version: '0'
116
133
  required_rubygems_version: !ruby/object:Gem::Requirement
117
134
  requirements:
118
- - - '>='
135
+ - - ">="
119
136
  - !ruby/object:Gem::Version
120
137
  version: '0'
121
138
  requirements: []
122
139
  rubyforge_project: fluent-plugin-stats-notifier
123
- rubygems_version: 2.0.3
140
+ rubygems_version: 2.5.2
124
141
  signing_key:
125
142
  specification_version: 4
126
143
  summary: Fluentd plugin to calculate statistics and then thresholding