logstash-mixin-http_client 2.2.0 → 2.2.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dc84bd2e6f07407dea886030c9e2aafe670f25e3
4
- data.tar.gz: c5cdbb9d5973842be8222e3b718db1965d907e71
3
+ metadata.gz: 57fb8e8127a85c71e85f61692ec3506ad8ad0c4e
4
+ data.tar.gz: 98bbb4c5211f5cbcc8b4adfe21e1ccf5e26cf85d
5
5
  SHA512:
6
- metadata.gz: adff2b1cb9c1e2f686d18faf5e756fdfb8a78f36901f8bc4832993b058cd687f4616d5ec6385e3abbbb576e99b3969576272424af9fb3bb74ac93e2a9fc10653
7
- data.tar.gz: c09d2bf09f038e1e6e4e77acd0dd4a76a28be684957de0fbef0a25787b7abc901b43807502bf24d6b1d31d96e24e15763abb4531142c683c9cfac79ed4f5b0ac
6
+ metadata.gz: b3c1a7b5cd816f0080a5e3233b9f7f4b7bbd3341f5ab85b6774201ba0248542c98fe11b10c34276772a377cf84c1b43ed2803a95420ca07b83a016ce7403b977
7
+ data.tar.gz: 171cef74131ad528f723752484368db9ce91ccd6b1ba76c99fb5003c65bf58bbc09324367f5b1069f5ba1147de151be40c11f523d755e852336f8d2226f2d8dd
data/CHANGELOG.md CHANGED
@@ -1,3 +1,5 @@
1
+ # 2.2.1
2
+ * Use a superior 'validate_after_inactivity' default of 200ms to force more frequent checks for broken keepalive situations
1
3
  # 2.2.0
2
4
  * Bump manticore version to be at least 0.5.2 for #close support
3
5
  # 2.1.0
@@ -45,6 +45,13 @@ module LogStash::PluginMixins::HttpClient
45
45
  # If `automatic_retries` is enabled this will cause non-idempotent HTTP verbs (such as POST) to be retried.
46
46
  config :retry_non_idempotent, :validate => :boolean, :default => false
47
47
 
48
+ # How long to wait before checking if the connection is stale before executing a request on a connection using keepalive.
49
+ # # You may want to set this lower, possibly to 0 if you get connection errors regularly
50
+ # Quoting the Apache commons docs (this client is based Apache Commmons):
51
+ # 'Defines period of inactivity in milliseconds after which persistent connections must be re-validated prior to being leased to the consumer. Non-positive value passed to this method disables connection validation. This check helps detect connections that have become stale (half-closed) while kept inactive in the pool.'
52
+ # See https://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/org/apache/http/impl/conn/PoolingHttpClientConnectionManager.html#setValidateAfterInactivity(int)[these docs for more info]
53
+ config :validate_after_inactivity, :validate => :number, :default => 200
54
+
48
55
  # Set this to false to disable SSL/TLS certificate validation
49
56
  # Note: setting this to false is generally considered insecure!
50
57
  config :ssl_certificate_validation, :validate => :boolean, :default => true
@@ -98,6 +105,7 @@ module LogStash::PluginMixins::HttpClient
98
105
  follow_redirects: @follow_redirects,
99
106
  automatic_retries: @automatic_retries,
100
107
  retry_non_idempotent: @retry_non_idempotent,
108
+ check_connection_timeout: @validate_after_inactivity,
101
109
  pool_max: @pool_max,
102
110
  pool_max_per_route: @pool_max_per_route,
103
111
  cookies: @cookies,
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-mixin-http_client'
3
- s.version = '2.2.0'
3
+ s.version = '2.2.1'
4
4
  s.licenses = ['Apache License (2.0)']
5
5
  s.summary = "AWS mixins to provide a unified interface for Amazon Webservice"
6
6
  s.description = "This gem is a logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/plugin install gemname. This gem is not a stand-alone program"
@@ -16,7 +16,7 @@ Gem::Specification.new do |s|
16
16
  s.test_files = s.files.grep(%r{^(test|spec|features)/})
17
17
 
18
18
  # Gem dependencies
19
- s.add_runtime_dependency "logstash-core", ">= 2.0.0.beta2", "< 3.0.0"
19
+ s.add_runtime_dependency "logstash-core", ">= 2.0.0", "< 3.0.0"
20
20
  s.add_runtime_dependency 'logstash-codec-plain'
21
21
  s.add_runtime_dependency 'manticore', '>= 0.5.2', '< 1.0.0'
22
22
 
@@ -37,7 +37,7 @@ describe LogStash::PluginMixins::HttpClient do
37
37
  end
38
38
 
39
39
  if type == :jks
40
- let(:store_password) { conf["#{key}_password"].value}
40
+ let(:store_password) { conf["#{key}_password"] }
41
41
  let(:store_type) { conf["#{key}_type"]}
42
42
 
43
43
  it "should set the bundle password" do
@@ -74,6 +74,17 @@ describe LogStash::PluginMixins::HttpClient do
74
74
  end
75
75
  end
76
76
 
77
+ describe "with a custom validate_after_activity" do
78
+ subject { Dummy.new(client_config).send(:client_config) }
79
+
80
+ let(:check_timeout) { 20 }
81
+ let(:client_config) { basic_config.merge("validate_after_inactivity" => check_timeout )}
82
+
83
+ it "should properly set the correct manticore option" do
84
+ expect(subject[:check_connection_timeout]).to eql(check_timeout)
85
+ end
86
+ end
87
+
77
88
  describe "with a custom keystore" do
78
89
  let(:file) { Stud::Temporary.file }
79
90
  let(:path) { file.path }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-mixin-http_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-21 00:00:00.000000000 Z
11
+ date: 2016-02-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: logstash-core
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - '>='
18
18
  - !ruby/object:Gem::Version
19
- version: 2.0.0.beta2
19
+ version: 2.0.0
20
20
  - - <
21
21
  - !ruby/object:Gem::Version
22
22
  version: 3.0.0
@@ -24,7 +24,7 @@ dependencies:
24
24
  requirements:
25
25
  - - '>='
26
26
  - !ruby/object:Gem::Version
27
- version: 2.0.0.beta2
27
+ version: 2.0.0
28
28
  - - <
29
29
  - !ruby/object:Gem::Version
30
30
  version: 3.0.0