fluent-plugin-stats 0.3.2 → 0.3.3
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 +4 -4
- data/CHANGELOG.md +6 -0
- data/fluent-plugin-stats.gemspec +1 -1
- data/lib/fluent/plugin/out_stats.rb +12 -7
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 28926898a6e0a00aad103bafd93aa8372cd22055
|
4
|
+
data.tar.gz: 810624bf7e711d5cb30377545c3516edb0c4a5de
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 929e982bb1c14ae5eeb7a8ff26be6196cc002128fd78921e474b9883d842b0d6a2719a6a1b2f6090713c84f252fece52270c0c175ccc4f31efefc02331b24955
|
7
|
+
data.tar.gz: 0a9a65241a2b21d2ec3c1267be1e73853c69463085d0fb9ed6c7ea45ba83f766e91910efa39827ea9332bf42e53a07c0fb50c718fe05b999bb0fc49ee15f31a0
|
data/CHANGELOG.md
CHANGED
data/fluent-plugin-stats.gemspec
CHANGED
@@ -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"
|
6
|
-
s.version = "0.3.
|
6
|
+
s.version = "0.3.3"
|
7
7
|
s.authors = ["Naotoshi Seo"]
|
8
8
|
s.email = ["sonots@gmail.com"]
|
9
9
|
s.homepage = "https://github.com/sonots/fluent-plugin-stats"
|
@@ -2,6 +2,11 @@
|
|
2
2
|
class Fluent::StatsOutput < Fluent::Output
|
3
3
|
Fluent::Plugin.register_output('stats', self)
|
4
4
|
|
5
|
+
# To support log_level option implemented by Fluentd v0.10.43
|
6
|
+
unless method_defined?(:log)
|
7
|
+
define_method("log") { $log }
|
8
|
+
end
|
9
|
+
|
5
10
|
def initialize
|
6
11
|
super
|
7
12
|
require 'pathname'
|
@@ -170,7 +175,7 @@ class Fluent::StatsOutput < Fluent::Output
|
|
170
175
|
|
171
176
|
chain.next
|
172
177
|
rescue => e
|
173
|
-
|
178
|
+
log.warn "#{e.class} #{e.message} #{e.backtrace.first}"
|
174
179
|
end
|
175
180
|
|
176
181
|
# thread callback
|
@@ -184,7 +189,7 @@ class Fluent::StatsOutput < Fluent::Output
|
|
184
189
|
flush_emit
|
185
190
|
end
|
186
191
|
rescue => e
|
187
|
-
|
192
|
+
log.warn "#{e.class} #{e.message} #{e.backtrace.first}"
|
188
193
|
end
|
189
194
|
end
|
190
195
|
end
|
@@ -255,7 +260,7 @@ class Fluent::StatsOutput < Fluent::Output
|
|
255
260
|
}, f)
|
256
261
|
end
|
257
262
|
rescue => e
|
258
|
-
|
263
|
+
log.warn "out_stats: Can't write store_file #{e.class} #{e.message}"
|
259
264
|
end
|
260
265
|
end
|
261
266
|
|
@@ -276,7 +281,7 @@ class Fluent::StatsOutput < Fluent::Output
|
|
276
281
|
stored[:avg] == @avg
|
277
282
|
|
278
283
|
if !stored[:matches].empty? and !stored[:matches].first[1].has_key?(:max)
|
279
|
-
|
284
|
+
log.warn "out_stats: stored data does not have compatibility with the current version. ignore stored data"
|
280
285
|
return
|
281
286
|
end
|
282
287
|
|
@@ -292,14 +297,14 @@ class Fluent::StatsOutput < Fluent::Output
|
|
292
297
|
# skip the saved duration to continue counting
|
293
298
|
@last_checked = Fluent::Engine.now - @saved_duration
|
294
299
|
else
|
295
|
-
|
300
|
+
log.warn "out_stats: stored data is outdated. ignore stored data"
|
296
301
|
end
|
297
302
|
else
|
298
|
-
|
303
|
+
log.warn "out_stats: configuration param was changed. ignore stored data"
|
299
304
|
end
|
300
305
|
end
|
301
306
|
rescue => e
|
302
|
-
|
307
|
+
log.warn "out_stats: Can't load store_file #{e.class} #{e.message}"
|
303
308
|
end
|
304
309
|
end
|
305
310
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-stats
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
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-
|
11
|
+
date: 2014-02-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fluentd
|