fluent-plugin-input-opensearch 1.2.3 → 1.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/fluent-plugin-opensearch.gemspec +1 -1
- data/lib/fluent/plugin/in_opensearch.rb +8 -6
- 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: 9418f867988b41854b21285006db5adce7875d9a0eb5e480989e70146674fddd
|
4
|
+
data.tar.gz: fc1aaa976dffc952a028dc944048cf579d8bd0112003ea40ab82ca26149a2d1d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 61cbf7e514a16a3e292d072f59d81bc5d37ab6aa7e6d8bc5a8a2ec76d1cbc7972054e109b003c39be1d2195ff6c9648d153c62f72c708e7a4d999c3489f2bf08
|
7
|
+
data.tar.gz: 71484682650b25de3a6e77ae3e17621c2a8ff691e80ea1e6ed9f5a809f658eee8f2122271f7b8aa8919b73076c2afc08d50f70659bab2c67babc53bdec7506b2
|
@@ -3,7 +3,7 @@ $:.push File.expand_path('../lib', __FILE__)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = 'fluent-plugin-input-opensearch'
|
6
|
-
s.version = '1.2.
|
6
|
+
s.version = '1.2.4'
|
7
7
|
s.authors = ['imcotop']
|
8
8
|
s.email = ['imcotop@icloud.com']
|
9
9
|
s.description = %q{Opensearch output plugin for Fluent event collector}
|
@@ -64,7 +64,7 @@ module Fluent::Plugin
|
|
64
64
|
config_param :repeat, :bool, :default => true
|
65
65
|
config_param :http_backend, :enum, list: [:excon, :typhoeus], :default => :excon
|
66
66
|
config_param :request_timeout, :time, :default => 5
|
67
|
-
config_param :reload_connections, :bool, :default =>
|
67
|
+
config_param :reload_connections, :bool, :default => false
|
68
68
|
config_param :reload_on_failure, :bool, :default => false
|
69
69
|
config_param :resurrect_after, :time, :default => 60
|
70
70
|
config_param :reload_after, :integer, :default => DEFAULT_RELOAD_AFTER
|
@@ -215,7 +215,7 @@ module Fluent::Plugin
|
|
215
215
|
host: ["#{host[:scheme]}://#{host[:host]}:#{host[:port]}"],
|
216
216
|
user: host[:user],
|
217
217
|
password: host[:password],
|
218
|
-
reload_connections: @reload_connections,
|
218
|
+
# reload_connections: @reload_connections,
|
219
219
|
request_timeout: @request_timeout,
|
220
220
|
resurrect_after: @resurrect_after,
|
221
221
|
reload_on_failure: @reload_on_failure,
|
@@ -343,11 +343,12 @@ module Fluent::Plugin
|
|
343
343
|
@retry = retry_state(@retry_randomize)
|
344
344
|
end
|
345
345
|
@retry.step
|
346
|
-
|
347
|
-
|
348
|
-
log.error("Hit limit for retries. retry_times: #{@retry.steps}, #{error.message}")
|
346
|
+
if error.message.include?('EOFError (EOFError)')
|
347
|
+
log.error("Restart plugin #{error.message}")
|
349
348
|
exit(1)
|
350
349
|
end
|
350
|
+
#Raise error if the retry limit has been reached
|
351
|
+
raise "Hit limit for retries. retry_times: #{@retry.steps}, error: #{error.message}" if @retry.limit?
|
351
352
|
#Retry if the limit hasn't been reached
|
352
353
|
log.warn("failed to connect or search.", retry_times: @retry.steps, next_retry_time: @retry.next_time.round, error: error.message)
|
353
354
|
sleep(@retry.next_time - Time.now)
|
@@ -363,12 +364,13 @@ module Fluent::Plugin
|
|
363
364
|
return run_slice if @num_slices <= 1
|
364
365
|
|
365
366
|
log.warn("Large slice number is specified:(#{@num_slices}). Consider reducing num_slices") if @num_slices > 8
|
367
|
+
|
366
368
|
@num_slices.times.map do |slice_id|
|
367
369
|
thread_create(:"in_opensearch_thread_#{slice_id}") do
|
368
370
|
run_slice(slice_id)
|
369
371
|
end
|
370
372
|
end
|
371
|
-
rescue => error
|
373
|
+
rescue Faraday::ConnectionFailed, OpenSearch::Transport::Transport::Error => error
|
372
374
|
update_retry_state(error)
|
373
375
|
retry
|
374
376
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-input-opensearch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- imcotop
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-06-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fluentd
|