logstash-input-elasticsearch 4.0.1 → 4.0.2

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: 2a0e5a727cc097ec00743d23dcef666cf7e07581
4
- data.tar.gz: d415d62a7901234a0dfb3e702bf619a000bd51ca
3
+ metadata.gz: cfcf0809f15cabb90372ff0ed684bbc63299bc04
4
+ data.tar.gz: 3350926e0b5063633931abd52b34e5bdd5db5d16
5
5
  SHA512:
6
- metadata.gz: 0e48d5b0e0179e48f96b93080e7b688e84d5c218e302d0d6a5e622432358e1659c8e10365d9d9a7ee7e68d4047884935be2ef7efc6bbf4cf64f0769a7b135eed
7
- data.tar.gz: d430ea78cb36bfdd40fca16c92165627306dccf1b5d2d7ed998ba416a2a180b4767b557354c14c6f3d0ada60e381c71b06f3053d9ab97f68669690953f593c61
6
+ metadata.gz: f868c0fdb9be3b97382a47fdb5edb9f7d2a593ee8c254f9a1358a6838f80eee16c32814e15a38edb5379a2a8f12de552b952f3b3009029100ee19dd70ca8d227
7
+ data.tar.gz: 0ca36c5dcb0852eca499fefa32722ddfd784d0495e3e520a459b0edc99706249677a2fef2f4b9d5c6867426f3e5212fba672862ccee92661bed386021d6aa89a
@@ -1,3 +1,7 @@
1
+ ## 4.0.2
2
+ - Bump ES client to 5.0.2 to get content-type: json behavior
3
+ - Revert unneeded manticore change
4
+
1
5
  ## 4.0.1
2
6
  - Switch internal HTTP client to support TLSv1.2
3
7
  - Upgrade ES client internally to better support ES 5.x
@@ -1,8 +1,6 @@
1
1
  # encoding: utf-8
2
2
  require "logstash/inputs/base"
3
3
  require "logstash/namespace"
4
- require 'elasticsearch'
5
- require 'elasticsearch/transport/transport/http/manticore'
6
4
  require "base64"
7
5
 
8
6
  # Read from an Elasticsearch cluster, based on search query results.
@@ -107,6 +105,8 @@ class LogStash::Inputs::Elasticsearch < LogStash::Inputs::Base
107
105
  config :ca_file, :validate => :path
108
106
 
109
107
  def register
108
+ require "elasticsearch"
109
+
110
110
  @options = {
111
111
  :index => @index,
112
112
  :body => @query,
@@ -117,10 +117,8 @@ class LogStash::Inputs::Elasticsearch < LogStash::Inputs::Base
117
117
  transport_options = {}
118
118
 
119
119
  if @user && @password
120
- transport_options[:auth] = {
121
- :user => @user,
122
- :password => @password.value
123
- }
120
+ token = Base64.strict_encode64("#{@user}:#{@password.value}")
121
+ transport_options[:headers] = { :Authorization => "Basic #{token}" }
124
122
  end
125
123
 
126
124
  hosts = if @ssl then
@@ -132,17 +130,11 @@ class LogStash::Inputs::Elasticsearch < LogStash::Inputs::Base
132
130
  @hosts
133
131
  end
134
132
 
135
- client_options = {
136
- :hosts => hosts,
137
- :transport_options => transport_options,
138
- :transport_class => Elasticsearch::Transport::Transport::HTTP::Manticore
139
- }
140
-
141
133
  if @ssl && @ca_file
142
- client_options[:ssl] = { :enabled => true, :ca_file => @ca_file }
134
+ transport_options[:ssl] = { :ca_file => @ca_file }
143
135
  end
144
-
145
- @client = Elasticsearch::Client.new(client_options)
136
+
137
+ @client = Elasticsearch::Client.new(:hosts => hosts, :transport_options => transport_options)
146
138
  end
147
139
 
148
140
  def run(output_queue)
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
 
3
3
  s.name = 'logstash-input-elasticsearch'
4
- s.version = '4.0.1'
4
+ s.version = '4.0.2'
5
5
  s.licenses = ['Apache License (2.0)']
6
6
  s.summary = "Read from an Elasticsearch cluster, based on search query results"
7
7
  s.description = "This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program"
@@ -22,9 +22,7 @@ Gem::Specification.new do |s|
22
22
  # Gem dependencies
23
23
  s.add_runtime_dependency "logstash-core-plugin-api", ">= 1.60", "<= 2.99"
24
24
 
25
- s.add_runtime_dependency 'elasticsearch', ['>= 5.0.0', '< 6.0.0']
26
- s.add_runtime_dependency "manticore", '>= 0.5.4', '< 1.0.0'
27
-
25
+ s.add_runtime_dependency 'elasticsearch', ['>= 5.0.3', '< 6.0.0']
28
26
 
29
27
  s.add_runtime_dependency 'logstash-codec-json'
30
28
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-input-elasticsearch
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.1
4
+ version: 4.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-03 00:00:00.000000000 Z
11
+ date: 2017-02-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -35,7 +35,7 @@ dependencies:
35
35
  requirements:
36
36
  - - ">="
37
37
  - !ruby/object:Gem::Version
38
- version: 5.0.0
38
+ version: 5.0.3
39
39
  - - "<"
40
40
  - !ruby/object:Gem::Version
41
41
  version: 6.0.0
@@ -46,30 +46,10 @@ dependencies:
46
46
  requirements:
47
47
  - - ">="
48
48
  - !ruby/object:Gem::Version
49
- version: 5.0.0
49
+ version: 5.0.3
50
50
  - - "<"
51
51
  - !ruby/object:Gem::Version
52
52
  version: 6.0.0
53
- - !ruby/object:Gem::Dependency
54
- requirement: !ruby/object:Gem::Requirement
55
- requirements:
56
- - - ">="
57
- - !ruby/object:Gem::Version
58
- version: 0.5.4
59
- - - "<"
60
- - !ruby/object:Gem::Version
61
- version: 1.0.0
62
- name: manticore
63
- prerelease: false
64
- type: :runtime
65
- version_requirements: !ruby/object:Gem::Requirement
66
- requirements:
67
- - - ">="
68
- - !ruby/object:Gem::Version
69
- version: 0.5.4
70
- - - "<"
71
- - !ruby/object:Gem::Version
72
- version: 1.0.0
73
53
  - !ruby/object:Gem::Dependency
74
54
  requirement: !ruby/object:Gem::Requirement
75
55
  requirements: