logstash-input-elasticsearch 4.0.2 → 4.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/logstash/inputs/elasticsearch.rb +11 -1
- data/logstash-input-elasticsearch.gemspec +1 -1
- data/spec/inputs/elasticsearch_spec.rb +2 -2
- metadata +20 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 60ae7f6cc0bb6581187f15e57f0655b91cc6e14b
|
4
|
+
data.tar.gz: 712a2ddf325e7eaa84594a341d30ce7a4a48cfd6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9b9354d32b3442b276df1e30953768b8388305fee0162162939c3f3418bc15c5bff04a5f3e563338cf87f5fa5f3cf779484bab39312e26b7ec1b498e0ddf949d
|
7
|
+
data.tar.gz: 8561315ff579ee5059f0ff11ccd012530e928eb37cbe894707fc96aa052590baa8c9b3fee1459556b85aa072e8e737902b2643be5a732d748262fbfc3222869a
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
## 4.0.3
|
2
|
+
- Docs: Add requirement to use version 4.0.2 or higher to support sending Content-Type headers
|
3
|
+
- Fix scrolling to use json bodies in the requests (this makes scrolling not work in ES 1.x)
|
4
|
+
|
1
5
|
## 4.0.2
|
2
6
|
- Bump ES client to 5.0.2 to get content-type: json behavior
|
3
7
|
- Revert unneeded manticore change
|
@@ -3,6 +3,16 @@ require "logstash/inputs/base"
|
|
3
3
|
require "logstash/namespace"
|
4
4
|
require "base64"
|
5
5
|
|
6
|
+
# .Compatibility Note
|
7
|
+
# [NOTE]
|
8
|
+
# ================================================================================
|
9
|
+
# Starting with Elasticsearch 5.3, there's an {ref}modules-http.html[HTTP setting]
|
10
|
+
# called `http.content_type.required`. If this option is set to `true`, and you
|
11
|
+
# are using Logstash 2.4 through 5.2, you need to update the Elasticsearch input
|
12
|
+
# plugin to version 4.0.2 or higher.
|
13
|
+
#
|
14
|
+
# ================================================================================
|
15
|
+
#
|
6
16
|
# Read from an Elasticsearch cluster, based on search query results.
|
7
17
|
# This is useful for replaying test logs, reindexing, etc.
|
8
18
|
#
|
@@ -184,6 +194,6 @@ class LogStash::Inputs::Elasticsearch < LogStash::Inputs::Base
|
|
184
194
|
end
|
185
195
|
|
186
196
|
def scroll_request scroll_id
|
187
|
-
@client.scroll(:body => scroll_id, :scroll => @scroll)
|
197
|
+
@client.scroll(:body => { :scroll_id => scroll_id }, :scroll => @scroll)
|
188
198
|
end
|
189
199
|
end
|
@@ -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.
|
4
|
+
s.version = '4.0.3'
|
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"
|
@@ -63,7 +63,7 @@ describe LogStash::Inputs::Elasticsearch do
|
|
63
63
|
client = Elasticsearch::Client.new
|
64
64
|
expect(Elasticsearch::Client).to receive(:new).with(any_args).and_return(client)
|
65
65
|
expect(client).to receive(:search).with(any_args).and_return(response)
|
66
|
-
expect(client).to receive(:scroll).with({ :body => "cXVlcnlUaGVuRmV0Y2g", :scroll=> "1m" }).and_return(scroll_reponse)
|
66
|
+
expect(client).to receive(:scroll).with({ :body => { :scroll_id => "cXVlcnlUaGVuRmV0Y2g" }, :scroll=> "1m" }).and_return(scroll_reponse)
|
67
67
|
|
68
68
|
event = input(config) do |pipeline, queue|
|
69
69
|
queue.pop
|
@@ -114,7 +114,7 @@ describe LogStash::Inputs::Elasticsearch do
|
|
114
114
|
before do
|
115
115
|
expect(Elasticsearch::Client).to receive(:new).with(any_args).and_return(client)
|
116
116
|
expect(client).to receive(:search).with(any_args).and_return(response)
|
117
|
-
allow(client).to receive(:scroll).with({ :body => "cXVlcnlUaGVuRmV0Y2g", :scroll => "1m" }).and_return(scroll_reponse)
|
117
|
+
allow(client).to receive(:scroll).with({ :body => {:scroll_id => "cXVlcnlUaGVuRmV0Y2g"}, :scroll => "1m" }).and_return(scroll_reponse)
|
118
118
|
end
|
119
119
|
|
120
120
|
context 'when defining docinfo' do
|
metadata
CHANGED
@@ -1,17 +1,18 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-input-elasticsearch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.
|
4
|
+
version: 4.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elastic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-04-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
|
14
|
+
name: logstash-core-plugin-api
|
15
|
+
version_requirements: !ruby/object:Gem::Requirement
|
15
16
|
requirements:
|
16
17
|
- - ">="
|
17
18
|
- !ruby/object:Gem::Version
|
@@ -19,10 +20,7 @@ dependencies:
|
|
19
20
|
- - "<="
|
20
21
|
- !ruby/object:Gem::Version
|
21
22
|
version: '2.99'
|
22
|
-
|
23
|
-
prerelease: false
|
24
|
-
type: :runtime
|
25
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirement: !ruby/object:Gem::Requirement
|
26
24
|
requirements:
|
27
25
|
- - ">="
|
28
26
|
- !ruby/object:Gem::Version
|
@@ -30,8 +28,11 @@ dependencies:
|
|
30
28
|
- - "<="
|
31
29
|
- !ruby/object:Gem::Version
|
32
30
|
version: '2.99'
|
31
|
+
prerelease: false
|
32
|
+
type: :runtime
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
|
-
|
34
|
+
name: elasticsearch
|
35
|
+
version_requirements: !ruby/object:Gem::Requirement
|
35
36
|
requirements:
|
36
37
|
- - ">="
|
37
38
|
- !ruby/object:Gem::Version
|
@@ -39,10 +40,7 @@ dependencies:
|
|
39
40
|
- - "<"
|
40
41
|
- !ruby/object:Gem::Version
|
41
42
|
version: 6.0.0
|
42
|
-
|
43
|
-
prerelease: false
|
44
|
-
type: :runtime
|
45
|
-
version_requirements: !ruby/object:Gem::Requirement
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
46
44
|
requirements:
|
47
45
|
- - ">="
|
48
46
|
- !ruby/object:Gem::Version
|
@@ -50,34 +48,36 @@ dependencies:
|
|
50
48
|
- - "<"
|
51
49
|
- !ruby/object:Gem::Version
|
52
50
|
version: 6.0.0
|
51
|
+
prerelease: false
|
52
|
+
type: :runtime
|
53
53
|
- !ruby/object:Gem::Dependency
|
54
|
+
name: logstash-codec-json
|
55
|
+
version_requirements: !ruby/object:Gem::Requirement
|
56
|
+
requirements:
|
57
|
+
- - ">="
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
version: '0'
|
54
60
|
requirement: !ruby/object:Gem::Requirement
|
55
61
|
requirements:
|
56
62
|
- - ">="
|
57
63
|
- !ruby/object:Gem::Version
|
58
64
|
version: '0'
|
59
|
-
name: logstash-codec-json
|
60
65
|
prerelease: false
|
61
66
|
type: :runtime
|
67
|
+
- !ruby/object:Gem::Dependency
|
68
|
+
name: logstash-devutils
|
62
69
|
version_requirements: !ruby/object:Gem::Requirement
|
63
70
|
requirements:
|
64
71
|
- - ">="
|
65
72
|
- !ruby/object:Gem::Version
|
66
73
|
version: '0'
|
67
|
-
- !ruby/object:Gem::Dependency
|
68
74
|
requirement: !ruby/object:Gem::Requirement
|
69
75
|
requirements:
|
70
76
|
- - ">="
|
71
77
|
- !ruby/object:Gem::Version
|
72
78
|
version: '0'
|
73
|
-
name: logstash-devutils
|
74
79
|
prerelease: false
|
75
80
|
type: :development
|
76
|
-
version_requirements: !ruby/object:Gem::Requirement
|
77
|
-
requirements:
|
78
|
-
- - ">="
|
79
|
-
- !ruby/object:Gem::Version
|
80
|
-
version: '0'
|
81
81
|
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
|
82
82
|
email: info@elastic.co
|
83
83
|
executables: []
|