fluent-plugin-elasticsearch-stats 0.8.1 → 0.9.0
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/Gemfile.lock +1 -1
- data/fluent-plugin-elasticsearch-stats.gemspec +1 -1
- data/lib/fluent/plugin/in_elasticsearch_stats.rb +5 -12
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b5c32208c725414ac9a41f920b0665ea2c861bff21257ace8703ad6bb86f582f
|
|
4
|
+
data.tar.gz: debd380f2b5ffd75c9e493b331a1c2e2d4bf173771a608d84e76ae75255cc393
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f2d4de6fb32f987cd02933ac16c1711b70e144ad253d89e782342be621c275bcb996735aa5646157c0c8dbcab9d659bf3f2c1aeebc24c840dc2734d4ade83496
|
|
7
|
+
data.tar.gz: 73b0662af31804168bc50b9644447046f553cd5d27beab782a9a3845fca933e548c5d457a2b6fe22f6ae86e56da018039ce402009fb3c4717f84cc9f83bd6b1f
|
data/Gemfile.lock
CHANGED
|
@@ -5,7 +5,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
|
5
5
|
|
|
6
6
|
Gem::Specification.new do |spec|
|
|
7
7
|
spec.name = 'fluent-plugin-elasticsearch-stats'
|
|
8
|
-
spec.version = '0.
|
|
8
|
+
spec.version = '0.9.0'
|
|
9
9
|
spec.authors = ['Thomas Tych']
|
|
10
10
|
spec.email = ['thomas.tych@gmail.com']
|
|
11
11
|
|
|
@@ -144,8 +144,6 @@ module Fluent
|
|
|
144
144
|
raise Fluent::ConfigError, 'tag should not be empty' if tag.empty?
|
|
145
145
|
raise Fluent::ConfigError, 'urls should not be empty' if urls.empty?
|
|
146
146
|
|
|
147
|
-
@mutex_emit = Mutex.new
|
|
148
|
-
|
|
149
147
|
wrong_fields = aggregated_index_metrics.select { |item| ! ALLOWED_AGGREGATED_INDEX_METRICS.include?(item) }
|
|
150
148
|
raise Fluent::ConfigError, "aggregated_index_metrics contains unexpected values: #{wrong_fields}" if wrong_fields.size > 0
|
|
151
149
|
|
|
@@ -190,21 +188,16 @@ module Fluent
|
|
|
190
188
|
@elasticsearchs.each do |elasticsearch|
|
|
191
189
|
threads << Thread.new do
|
|
192
190
|
metrics = elasticsearch.collect_stats_metrics
|
|
193
|
-
|
|
194
|
-
[Fluent::EventTime.now] * metrics.size,
|
|
195
|
-
metrics
|
|
196
|
-
)
|
|
197
|
-
emit_events(events)
|
|
191
|
+
emit_metrics(metrics)
|
|
198
192
|
end
|
|
199
193
|
end
|
|
200
194
|
threads.each(&:join)
|
|
201
195
|
end
|
|
202
196
|
|
|
203
|
-
def
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
router.emit_stream(tag, events)
|
|
197
|
+
def emit_metrics(metrics)
|
|
198
|
+
emit_time = Fluent::EventTime.now
|
|
199
|
+
metrics.each do |metric|
|
|
200
|
+
router.emit(tag, emit_time, metric)
|
|
208
201
|
end
|
|
209
202
|
end
|
|
210
203
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fluent-plugin-elasticsearch-stats
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.9.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Thomas Tych
|
|
@@ -249,7 +249,7 @@ licenses:
|
|
|
249
249
|
metadata:
|
|
250
250
|
homepage_uri: https://gitlab.com/ttych/fluent-plugin-elasticsearch-stats
|
|
251
251
|
source_code_uri: https://gitlab.com/ttych/fluent-plugin-elasticsearch-stats
|
|
252
|
-
documentation_uri: http://www.rubydoc.info/gems/fluent-plugin-elasticsearch-stats/0.
|
|
252
|
+
documentation_uri: http://www.rubydoc.info/gems/fluent-plugin-elasticsearch-stats/0.9.0
|
|
253
253
|
rubygems_mfa_required: 'true'
|
|
254
254
|
rdoc_options: []
|
|
255
255
|
require_paths:
|