logstash-output-https 0.0.2 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3d82f985925d379779d0fa80ddfe4bbd6a5bc89d
4
- data.tar.gz: 62be1b89fcf8bdbd01d0013e50d594e5a680c8f4
3
+ metadata.gz: f0ac3735fa0acf3c04b6cda2e0c96d5b9afe712b
4
+ data.tar.gz: f1574b4a9a353b87532ff9e03bf8096ca1bc2e02
5
5
  SHA512:
6
- metadata.gz: 5593f07a325200605d3edeed9cfede02d824014d2461c47fc52dd57cb69cf9179b645cd51eca747b4d09da1359965af3680019a69a830e059199423e3c1d3855
7
- data.tar.gz: b908908d288bc069c4de149ec1b3614b650227e6eff1feeda1203432c6cc9327379c9ce7274c0fdd71ed9947d329899b84964752277f281f96ce4cb265e92697
6
+ metadata.gz: 115cef6a7adf31bd408914e859c6c75421e8cd1c44d8602b67b5e605014e6cbc88fba6ae9914a724fdff28b23c7ca063ba4e0e00ab0d812d07cb4ef8e5213e42
7
+ data.tar.gz: 008a59fb92a26b4fe30f5aa38ee1803bdd667e1c455e1999fe5036c1b58c13abcc19dc224023e1e33f7a829f53bcb6018c88c272f7ee84fe6439d1e47fc46a31
data/Gemfile CHANGED
@@ -1,2 +1,5 @@
1
1
  source 'https://rubygems.org'
2
2
  gemspec
3
+ gem "connection_pool", '= 2.2.0'
4
+ gem "net-http-pipeline", '= 1.0.1'
5
+ gem "net-http-persistent", '= 2.9.4'
@@ -6,19 +6,20 @@ require "logstash/json"
6
6
  class LogStash::Outputs::Https < LogStash::Outputs::Base
7
7
  config_name "https"
8
8
 
9
- config :headers, :validate => :hash
10
9
  config :url, :validate => :string, :required => :true
11
- config :verb, :validate => ["put", "post"], :default => "post", :required => :true
10
+ config :ca_cert_file, :validate => :path, :required => :true
11
+ config :headers, :validate => :hash
12
+ config :verb, :validate => ["put", "post"], :default => "post"
12
13
 
13
14
  public
14
15
  def register
15
- require "net/http"
16
- require "uri"
16
+ require "net/http/persistent"
17
17
 
18
18
  @uri = URI.parse(@url)
19
- @agent = Net::HTTP.new(@uri.host, @uri.port)
20
- @agent.use_ssl = true
21
- @agent.verify_mode = OpenSSL::SSL::VERIFY_NONE
19
+ @agent = Net::HTTP::Persistent.new("logstash_client")
20
+ @agent.reuse_ssl_sessions = true
21
+ @agent.ca_file = @ca_cert_file
22
+ @agent.verify_mode = OpenSSL::SSL::VERIFY_PEER
22
23
  end
23
24
 
24
25
  public
@@ -44,7 +45,7 @@ class LogStash::Outputs::Https < LogStash::Outputs::Base
44
45
  request["Content-Type"] = "application/json"
45
46
  request.body = event.to_json_with_metadata
46
47
 
47
- response = @agent.request(request)
48
+ response = @agent.request(@uri, request)
48
49
  #puts response.code
49
50
 
50
51
  rescue Exception => e
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
 
3
3
  s.name = 'logstash-output-https'
4
- s.version = '0.0.2'
4
+ s.version = '0.0.7'
5
5
  s.licenses = ['Apache License (2.0)']
6
6
  s.summary = "Simple HTTPS Output."
7
7
  s.description = "This gem is a logstash plugin 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."
@@ -21,6 +21,9 @@ Gem::Specification.new do |s|
21
21
 
22
22
  # Gem dependencies
23
23
  s.add_runtime_dependency "logstash-core", '>= 1.4.0', '< 2.0.0'
24
+ s.add_runtime_dependency "connection_pool", '= 2.2.0'
25
+ s.add_runtime_dependency "net-http-pipeline", '= 1.0.1'
26
+ s.add_runtime_dependency "net-http-persistent", '= 2.9.4'
24
27
  s.add_development_dependency 'logstash-devutils', '= 0.0.12'
25
28
 
26
29
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-output-https
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Emdeon Enterprise Monitoring
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-15 00:00:00.000000000 Z
11
+ date: 2015-05-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: logstash-core
@@ -30,6 +30,48 @@ dependencies:
30
30
  version: 2.0.0
31
31
  prerelease: false
32
32
  type: :runtime
33
+ - !ruby/object:Gem::Dependency
34
+ name: connection_pool
35
+ version_requirements: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - '='
38
+ - !ruby/object:Gem::Version
39
+ version: 2.2.0
40
+ requirement: !ruby/object:Gem::Requirement
41
+ requirements:
42
+ - - '='
43
+ - !ruby/object:Gem::Version
44
+ version: 2.2.0
45
+ prerelease: false
46
+ type: :runtime
47
+ - !ruby/object:Gem::Dependency
48
+ name: net-http-pipeline
49
+ version_requirements: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - '='
52
+ - !ruby/object:Gem::Version
53
+ version: 1.0.1
54
+ requirement: !ruby/object:Gem::Requirement
55
+ requirements:
56
+ - - '='
57
+ - !ruby/object:Gem::Version
58
+ version: 1.0.1
59
+ prerelease: false
60
+ type: :runtime
61
+ - !ruby/object:Gem::Dependency
62
+ name: net-http-persistent
63
+ version_requirements: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - '='
66
+ - !ruby/object:Gem::Version
67
+ version: 2.9.4
68
+ requirement: !ruby/object:Gem::Requirement
69
+ requirements:
70
+ - - '='
71
+ - !ruby/object:Gem::Version
72
+ version: 2.9.4
73
+ prerelease: false
74
+ type: :runtime
33
75
  - !ruby/object:Gem::Dependency
34
76
  name: logstash-devutils
35
77
  version_requirements: !ruby/object:Gem::Requirement