fluent-plugin-datacounter 0.4.2 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +4 -0
- data/README.md +2 -0
- data/fluent-plugin-datacounter.gemspec +1 -1
- data/lib/fluent/plugin/out_datacounter.rb +10 -5
- metadata +15 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1b4d91d5c90fe127587b87a6422a51c7615d4d35
|
4
|
+
data.tar.gz: 44286a9f86f2d5261090a4757abe2e5c5ca5bca1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a6f91229701fe9beb94961b5e080669a93d742aa870e50f776fcef86a0c7f9575be603524bbc44c5f6c9a8a09395eb4b1bfa0d42d33af34c00a7891b5b0a98f9
|
7
|
+
data.tar.gz: 190f1d713ba82566fb9ac4d8d47c944daf84e40d86abc8969158a0cfbb72e31e32d90f6397512875b119541c0b4f10b2bcd1c9ffa113073909840fab65b08f94
|
data/.travis.yml
ADDED
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
2
|
Gem::Specification.new do |gem|
|
3
3
|
gem.name = "fluent-plugin-datacounter"
|
4
|
-
gem.version = "0.4.
|
4
|
+
gem.version = "0.4.3"
|
5
5
|
gem.authors = ["TAGOMORI Satoshi"]
|
6
6
|
gem.email = ["tagomoris@gmail.com"]
|
7
7
|
gem.homepage = "https://github.com/tagomoris/fluent-plugin-datacounter"
|
@@ -1,6 +1,11 @@
|
|
1
1
|
class Fluent::DataCounterOutput < Fluent::Output
|
2
2
|
Fluent::Plugin.register_output('datacounter', self)
|
3
3
|
|
4
|
+
# Define `log` method for v0.10.42 or earlier
|
5
|
+
unless method_defined?(:log)
|
6
|
+
define_method("log") { $log }
|
7
|
+
end
|
8
|
+
|
4
9
|
def initialize
|
5
10
|
super
|
6
11
|
require 'pathname'
|
@@ -60,7 +65,7 @@ class Fluent::DataCounterOutput < Fluent::Output
|
|
60
65
|
pattern_keys = conf.keys.select{|k| k =~ /^pattern(\d+)$/}
|
61
66
|
invalids = pattern_keys.select{|arg| arg =~ /^pattern(\d+)/ and not (1..PATTERN_MAX_NUM).include?($1.to_i)}
|
62
67
|
if invalids.size > 0
|
63
|
-
|
68
|
+
log.warn "invalid number patterns (valid pattern number:1-20):" + invalids.join(",")
|
64
69
|
end
|
65
70
|
(1..PATTERN_MAX_NUM).each do |i|
|
66
71
|
next unless conf["pattern#{i}"]
|
@@ -278,7 +283,7 @@ class Fluent::DataCounterOutput < Fluent::Output
|
|
278
283
|
}, f)
|
279
284
|
end
|
280
285
|
rescue => e
|
281
|
-
|
286
|
+
log.warn "out_datacounter: Can't write store_file #{e.class} #{e.message}"
|
282
287
|
end
|
283
288
|
end
|
284
289
|
|
@@ -304,14 +309,14 @@ class Fluent::DataCounterOutput < Fluent::Output
|
|
304
309
|
# skip the saved duration to continue counting
|
305
310
|
@last_checked = Fluent::Engine.now - @saved_duration
|
306
311
|
else
|
307
|
-
|
312
|
+
log.warn "out_datacounter: stored data is outdated. ignore stored data"
|
308
313
|
end
|
309
314
|
else
|
310
|
-
|
315
|
+
log.warn "out_datacounter: configuration param was changed. ignore stored data"
|
311
316
|
end
|
312
317
|
end
|
313
318
|
rescue => e
|
314
|
-
|
319
|
+
log.warn "out_datacounter: Can't load store_file #{e.class} #{e.message}"
|
315
320
|
end
|
316
321
|
end
|
317
322
|
|
metadata
CHANGED
@@ -1,69 +1,69 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-datacounter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- TAGOMORI Satoshi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-03-07 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: bundler
|
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: rake
|
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: delorean
|
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
|
description: To count records with string fields by regexps (To count records with
|
@@ -74,7 +74,8 @@ executables: []
|
|
74
74
|
extensions: []
|
75
75
|
extra_rdoc_files: []
|
76
76
|
files:
|
77
|
-
- .gitignore
|
77
|
+
- ".gitignore"
|
78
|
+
- ".travis.yml"
|
78
79
|
- Gemfile
|
79
80
|
- LICENSE.txt
|
80
81
|
- README.md
|
@@ -94,21 +95,20 @@ require_paths:
|
|
94
95
|
- lib
|
95
96
|
required_ruby_version: !ruby/object:Gem::Requirement
|
96
97
|
requirements:
|
97
|
-
- -
|
98
|
+
- - ">="
|
98
99
|
- !ruby/object:Gem::Version
|
99
100
|
version: '0'
|
100
101
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
101
102
|
requirements:
|
102
|
-
- -
|
103
|
+
- - ">="
|
103
104
|
- !ruby/object:Gem::Version
|
104
105
|
version: '0'
|
105
106
|
requirements: []
|
106
107
|
rubyforge_project:
|
107
|
-
rubygems_version: 2.
|
108
|
+
rubygems_version: 2.2.2
|
108
109
|
signing_key:
|
109
110
|
specification_version: 4
|
110
111
|
summary: Fluentd plugin to count records with specified regexp patterns
|
111
112
|
test_files:
|
112
113
|
- test/helper.rb
|
113
114
|
- test/plugin/test_out_datacounter.rb
|
114
|
-
has_rdoc:
|