fluent-plugin-flowcounter 0.1.7 → 0.1.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: bfdce38cafd1a126c924aaf6e5d77c2e2c3d63da
4
+ data.tar.gz: 05cda19ad49378a4207a69d0a05c1dcb11e2542b
5
+ SHA512:
6
+ metadata.gz: 685895bfeb32f9e77a6b2a4cc960eff33be04ed060d119186e8e7fdd0976dbfc93300d9797066dc3b7befc0635d29e62a737b948a79e378fccc70b6d3271603c
7
+ data.tar.gz: ff5151d8a32dab10545d168ada66a5a36a9fd36941908c561c85394b1586b7a83d502efc6502cf9e80e849666eb7cf8ed98eed98797bf173c32d87d858c31cd4
@@ -69,6 +69,14 @@ To count with all fields in messages, specify 'count_keys *'.
69
69
  tag fluentd.traffic
70
70
  </match>
71
71
 
72
+ Use '${hostname}' if you want your hostname in tag.
73
+
74
+ <match target.**>
75
+ type flowcounter
76
+ count_keys *
77
+ tag fluentd.node.${hostname}
78
+ </match>
79
+
72
80
  == TODO
73
81
 
74
82
  - 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.1.7"
4
+ gem.version = "0.1.8"
5
5
  gem.authors = ["TAGOMORI Satoshi"]
6
6
  gem.email = ["tagomoris@gmail.com"]
7
7
  gem.summary = %q{Fluent plugin to count message flow}
@@ -16,4 +16,5 @@ Gem::Specification.new do |gem|
16
16
  gem.add_development_dependency "rake"
17
17
  gem.add_development_dependency "shoulda"
18
18
  gem.add_runtime_dependency "fluentd"
19
+ gem.add_runtime_dependency "fluent-mixin-config-placeholders"
19
20
  end
@@ -1,3 +1,5 @@
1
+ require 'fluent/mixin/config_placeholders'
2
+
1
3
  class Fluent::FlowCounterOutput < Fluent::Output
2
4
  Fluent::Plugin.register_output('flowcounter', self)
3
5
 
@@ -7,6 +9,8 @@ class Fluent::FlowCounterOutput < Fluent::Output
7
9
  config_param :input_tag_remove_prefix, :string, :default => nil
8
10
  config_param :count_keys, :string
9
11
 
12
+ include Fluent::Mixin::ConfigPlaceholders
13
+
10
14
  attr_accessor :counts
11
15
  attr_accessor :last_checked
12
16
  attr_accessor :count_all
@@ -82,6 +82,15 @@ count_keys message
82
82
  assert d.instance.count_all
83
83
  end
84
84
 
85
+ def test_configure_placeholders
86
+ d = create_driver %[
87
+ hostname testing.node.local
88
+ tag test.flowcount.${hostname}
89
+ count_keys *
90
+ ]
91
+ assert_equal 'test.flowcount.testing.node.local', d.instance.tag
92
+ end
93
+
85
94
  def test_count_initialized
86
95
  d = create_driver %[
87
96
  aggregate all
metadata CHANGED
@@ -1,62 +1,69 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-flowcounter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
5
- prerelease:
4
+ version: 0.1.8
6
5
  platform: ruby
7
6
  authors:
8
7
  - TAGOMORI Satoshi
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-04-08 00:00:00.000000000 Z
11
+ date: 2013-04-10 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rake
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: '0'
22
20
  type: :development
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - '>='
28
25
  - !ruby/object:Gem::Version
29
26
  version: '0'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: shoulda
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - '>='
36
32
  - !ruby/object:Gem::Version
37
33
  version: '0'
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ! '>='
38
+ - - '>='
44
39
  - !ruby/object:Gem::Version
45
40
  version: '0'
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: fluentd
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ! '>='
45
+ - - '>='
52
46
  - !ruby/object:Gem::Version
53
47
  version: '0'
54
48
  type: :runtime
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ! '>='
52
+ - - '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: fluent-mixin-config-placeholders
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - '>='
60
67
  - !ruby/object:Gem::Version
61
68
  version: '0'
62
69
  description: Plugin to counts messages/bytes that matches, per minutes/hours/days
@@ -79,27 +86,26 @@ files:
79
86
  - test/plugin/test_out_flowcounter.rb
80
87
  homepage: https://github.com/tagomoris/fluent-plugin-flowcounter
81
88
  licenses: []
89
+ metadata: {}
82
90
  post_install_message:
83
91
  rdoc_options: []
84
92
  require_paths:
85
93
  - lib
86
94
  required_ruby_version: !ruby/object:Gem::Requirement
87
- none: false
88
95
  requirements:
89
- - - ! '>='
96
+ - - '>='
90
97
  - !ruby/object:Gem::Version
91
98
  version: '0'
92
99
  required_rubygems_version: !ruby/object:Gem::Requirement
93
- none: false
94
100
  requirements:
95
- - - ! '>='
101
+ - - '>='
96
102
  - !ruby/object:Gem::Version
97
103
  version: '0'
98
104
  requirements: []
99
105
  rubyforge_project:
100
- rubygems_version: 1.8.23
106
+ rubygems_version: 2.0.0
101
107
  signing_key:
102
- specification_version: 3
108
+ specification_version: 4
103
109
  summary: Fluent plugin to count message flow
104
110
  test_files:
105
111
  - test/helper.rb