fluent-plugin-flowcounter 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +0 -1
- data/README.md +9 -0
- data/fluent-plugin-flowcounter.gemspec +1 -1
- data/lib/fluent/plugin/out_flowcounter.rb +5 -2
- 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: 7da7181ad46b9c8a8b331ed86079f4789312b357
|
4
|
+
data.tar.gz: da8fcc029b68158e94c51d33e47d11c1fdbdb30a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 006edff727622d81fe15799ce739866a748b36b0ff789edeb15233580e54ef48570530806f8a6105cff5e8804939dd7b8ac9c5a177ea00fd5389d16a0506827f
|
7
|
+
data.tar.gz: c5138f42f9cfcdce1b2c1976c8ee80d5134632a98db059f636cf291591c23f47fafe12b488148381e65a6c40a7c27f0f6fdf68ea4653b412a30e345f35d1620d
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -89,6 +89,15 @@ Use '${hostname}' if you want your hostname in tag.
|
|
89
89
|
tag fluentd.node.${hostname}
|
90
90
|
</match>
|
91
91
|
|
92
|
+
Counts active tag, stop count records if the tag message stoped(when aggragates per tag).
|
93
|
+
|
94
|
+
<match target.**>
|
95
|
+
@type flowcounter
|
96
|
+
count_keys *
|
97
|
+
aggregate tag
|
98
|
+
delete_idle true
|
99
|
+
</match>
|
100
|
+
|
92
101
|
## TODO
|
93
102
|
|
94
103
|
* consider what to do next
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
2
|
Gem::Specification.new do |gem|
|
3
3
|
gem.name = "fluent-plugin-flowcounter"
|
4
|
-
gem.version = "0.4.
|
4
|
+
gem.version = "0.4.2"
|
5
5
|
gem.authors = ["TAGOMORI Satoshi"]
|
6
6
|
gem.email = ["tagomoris@gmail.com"]
|
7
7
|
gem.summary = %q{Fluent plugin to count message flow}
|
@@ -20,6 +20,7 @@ class Fluent::FlowCounterOutput < Fluent::Output
|
|
20
20
|
config_param :input_tag_remove_prefix, :string, default: nil
|
21
21
|
config_param :count_keys, :string, default: nil
|
22
22
|
config_param :delimiter, :string, default: '_'
|
23
|
+
config_param :delete_idle, :bool, default: false
|
23
24
|
|
24
25
|
include Fluent::Mixin::ConfigPlaceholders
|
25
26
|
|
@@ -126,12 +127,14 @@ class Fluent::FlowCounterOutput < Fluent::Output
|
|
126
127
|
end
|
127
128
|
|
128
129
|
def flush(step)
|
129
|
-
|
130
|
+
keys = delete_idle ? nil : @counts.keys
|
131
|
+
flushed,@counts = @counts,count_initialized(keys)
|
130
132
|
generate_output(flushed, step)
|
131
133
|
end
|
132
134
|
|
133
135
|
def tagged_flush(step)
|
134
|
-
|
136
|
+
keys = delete_idle ? nil : @counts.keys
|
137
|
+
flushed,@counts = @counts,count_initialized(keys)
|
135
138
|
names = flushed.keys.select {|x| x.end_with?(delimiter + 'count')}.map {|x| x.chomp(delimiter + 'count')}
|
136
139
|
names.map {|name|
|
137
140
|
counts = {
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-flowcounter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- TAGOMORI Satoshi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-10-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|