fluent-plugin-metricsense 0.2.3 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 6430d058a31cc5069917ff310898b8e8cfc05b6e
4
+ data.tar.gz: 312a17043422d6acd5f159b67784a5ab7825d024
5
+ SHA512:
6
+ metadata.gz: 216fb1a2b7e72ac5236244bbecf7143ffc4ef2151e4796f7f95293de70c8c1476cc52978e31afb560d68b3d706c492a1cb0528c2218fca49344eab5f2ee7619b
7
+ data.tar.gz: d90f34a0ff17b574205d81aba56561e1eaac9bb14f4014ed7cfff5d8fea15fc0087d22c7476b620686e1b539fcdc40a02ff5184bd6fc54a7411acb58a966b72f
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.3
1
+ 0.2.4
@@ -101,6 +101,15 @@ module Fluent::MetricSenseOutput::Backends
101
101
  }
102
102
  }.to_json
103
103
 
104
+ METRIC_INITIALIZE_REQUEST_PER_MODE[UpdateMode::AVERAGE] = {
105
+ "type" => "gauge",
106
+ "attributes" => {
107
+ "aggregate" => true,
108
+ "source_aggregate" => true,
109
+ "summarize_function" => "average",
110
+ }
111
+ }.to_json
112
+
104
113
  def ensure_metric_initialized(http, name, mode)
105
114
  return if @initialized_metrics[name]
106
115
 
@@ -30,6 +30,7 @@ module Fluent
30
30
  module UpdateMode
31
31
  ADD = 0
32
32
  MAX = 1
33
+ AVERAGE = 2
33
34
  end
34
35
 
35
36
  class Backend
@@ -138,6 +139,8 @@ module Fluent
138
139
  case update_mode
139
140
  when "max"
140
141
  update_mode = UpdateMode::MAX
142
+ when "average"
143
+ update_mode = UpdateMode::AVERAGE
141
144
  else
142
145
  # default is add
143
146
  update_mode = UpdateMode::ADD
@@ -211,6 +214,12 @@ module Fluent
211
214
  end
212
215
  end
213
216
 
217
+ class AverageUpdater < MaxUpdater
218
+ def mode
219
+ UpdateMode::AVERAGE
220
+ end
221
+ end
222
+
214
223
  AggregationKey = Struct.new(:tag, :time, :seg_val, :seg_key)
215
224
 
216
225
  def write(chunk)
@@ -225,6 +234,8 @@ module Fluent
225
234
  updater = AddUpdater
226
235
  when UpdateMode::MAX
227
236
  updater = MaxUpdater
237
+ when UpdateMode::AVERAGE # AVERAGE uses MaxUpdater and calculate average on server-side aggregation
238
+ updater = AverageUpdater
228
239
  else # default is AddUpdater
229
240
  updater = AddUpdater
230
241
  end
metadata CHANGED
@@ -1,20 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-metricsense
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
5
- prerelease:
4
+ version: 0.2.4
6
5
  platform: ruby
7
6
  authors:
8
7
  - Sadayuki Furuhashi
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-08-07 00:00:00.000000000 Z
11
+ date: 2013-12-12 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: fluentd
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
17
  - - ~>
20
18
  - !ruby/object:Gem::Version
@@ -22,7 +20,6 @@ dependencies:
22
20
  type: :runtime
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
@@ -30,49 +27,43 @@ dependencies:
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: rake
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.8.7
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.8.7
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: bundler
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ! '>='
45
+ - - '>='
52
46
  - !ruby/object:Gem::Version
53
47
  version: 1.0.0
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ! '>='
52
+ - - '>='
60
53
  - !ruby/object:Gem::Version
61
54
  version: 1.0.0
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: simplecov
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
- - - ! '>='
59
+ - - '>='
68
60
  - !ruby/object:Gem::Version
69
61
  version: 0.5.4
70
62
  type: :development
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
- - - ! '>='
66
+ - - '>='
76
67
  - !ruby/object:Gem::Version
77
68
  version: 0.5.4
78
69
  description: MetricSense - application metrics aggregation plugin for Fluentd
@@ -93,27 +84,25 @@ files:
93
84
  - lib/fluent/plugin/out_metricsense.rb
94
85
  homepage: https://github.com/treasure-data/fluent-plugin-metricsense
95
86
  licenses: []
87
+ metadata: {}
96
88
  post_install_message:
97
89
  rdoc_options: []
98
90
  require_paths:
99
91
  - lib
100
92
  required_ruby_version: !ruby/object:Gem::Requirement
101
- none: false
102
93
  requirements:
103
- - - ! '>='
94
+ - - '>='
104
95
  - !ruby/object:Gem::Version
105
96
  version: '0'
106
97
  required_rubygems_version: !ruby/object:Gem::Requirement
107
- none: false
108
98
  requirements:
109
- - - ! '>='
99
+ - - '>='
110
100
  - !ruby/object:Gem::Version
111
101
  version: '0'
112
102
  requirements: []
113
103
  rubyforge_project:
114
- rubygems_version: 1.8.23
104
+ rubygems_version: 2.0.2
115
105
  signing_key:
116
- specification_version: 3
106
+ specification_version: 4
117
107
  summary: MetricSense - application metrics aggregation plugin for Fluentd
118
108
  test_files: []
119
- has_rdoc: false