logstash-output-elasticsearch 2.7.0-java → 2.7.1-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/logstash/outputs/elasticsearch.rb +3 -1
- data/lib/logstash/outputs/elasticsearch/common.rb +2 -4
- data/lib/logstash/outputs/elasticsearch/http_client_builder.rb +6 -2
- data/logstash-output-elasticsearch.gemspec +1 -1
- data/spec/integration/outputs/routing_spec.rb +1 -1
- data/spec/integration/outputs/templates_spec.rb +1 -3
- data/spec/integration/outputs/update_spec.rb +2 -1
- data/spec/unit/outputs/elasticsearch_spec.rb +54 -2
- metadata +33 -33
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a968ae201b4c933075d146acde8af91a2def01ff
|
4
|
+
data.tar.gz: a8b256d46697dee393d4cd56ab2e939650d4b3ca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 342d5170558e760265bc75e41fa095488a2944f8023636eee69f562d763aaf15f4bb954c1550d4410c4193265fcc00c94103becd80d353242fef671afaa28214
|
7
|
+
data.tar.gz: 09797bea573acaa3faf2a4c6d8e1fc615dc9ff265d10127170d5cf385266b5b63343de086f2669d1f95003091604b82ea313b95f396b0bf8481774a129f002a2
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
## 2.7.1
|
2
|
+
- Fix spec suite argument passing and other minor bugs
|
3
|
+
- Show test failures in CI
|
4
|
+
- Omit extraneous debug information in error messages
|
5
|
+
- Allow URI paths to work correctly when no 'path' option set
|
6
|
+
|
1
7
|
## 2.7.0
|
2
8
|
- Add `pipeline` configuration option for setting an ingest pipeline to run upon indexing
|
3
9
|
|
@@ -79,7 +79,9 @@ class LogStash::Outputs::ElasticSearch < LogStash::Outputs::Base
|
|
79
79
|
|
80
80
|
# HTTP Path at which the Elasticsearch server lives. Use this if you must run Elasticsearch behind a proxy that remaps
|
81
81
|
# the root path for the Elasticsearch HTTP API lives.
|
82
|
-
|
82
|
+
# Note that if you use paths as components of URLs in the 'hosts' field you may
|
83
|
+
# not also set this field. That will raise an error at startup
|
84
|
+
config :path, :validate => :string
|
83
85
|
|
84
86
|
# Enable SSL/TLS secured communication to Elasticsearch cluster. Leaving this unspecified will use whatever scheme
|
85
87
|
# is specified in the URLs listed in 'hosts'. If no explicit protocol is specified plain HTTP will be used.
|
@@ -177,8 +177,7 @@ module LogStash; module Outputs; class ElasticSearch;
|
|
177
177
|
"Attempted to send a bulk request to Elasticsearch configured at '#{@client.client_options[:hosts]}',"+
|
178
178
|
" but Elasticsearch appears to be unreachable or down!",
|
179
179
|
:error_message => e.message,
|
180
|
-
:class => e.class.name
|
181
|
-
:client_config => @client.client_options,
|
180
|
+
:class => e.class.name
|
182
181
|
)
|
183
182
|
@logger.debug("Failed actions for last bad bulk request!", :actions => actions)
|
184
183
|
|
@@ -193,8 +192,7 @@ module LogStash; module Outputs; class ElasticSearch;
|
|
193
192
|
"the configuration provided?",
|
194
193
|
:error_message => e.message,
|
195
194
|
:error_class => e.class.name,
|
196
|
-
:backtrace => e.backtrace
|
197
|
-
:client_config => @client.client_options,
|
195
|
+
:backtrace => e.backtrace
|
198
196
|
)
|
199
197
|
|
200
198
|
@logger.debug("Failed actions for last bad bulk request!", :actions => actions)
|
@@ -10,7 +10,11 @@ module LogStash; module Outputs; class ElasticSearch;
|
|
10
10
|
}
|
11
11
|
|
12
12
|
common_options[:timeout] = params["timeout"] if params["timeout"]
|
13
|
-
|
13
|
+
|
14
|
+
if params["path"]
|
15
|
+
client_settings[:path] = "/#{params["path"]}/".gsub(/\/+/, "/") # Normalize slashes
|
16
|
+
end
|
17
|
+
|
14
18
|
logger.debug? && logger.debug("Normalizing http path", :path => params["path"], :normalized => client_settings[:path])
|
15
19
|
|
16
20
|
client_settings.merge! setup_ssl(logger, params)
|
@@ -103,4 +107,4 @@ module LogStash; module Outputs; class ElasticSearch;
|
|
103
107
|
}
|
104
108
|
end
|
105
109
|
end
|
106
|
-
end; end; end
|
110
|
+
end; end; end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
|
3
3
|
s.name = 'logstash-output-elasticsearch'
|
4
|
-
s.version = '2.7.
|
4
|
+
s.version = '2.7.1'
|
5
5
|
s.licenses = ['apache-2.0']
|
6
6
|
s.summary = "Logstash Output to Elasticsearch"
|
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"
|
@@ -12,7 +12,7 @@ shared_examples "a routing indexer" do
|
|
12
12
|
before do
|
13
13
|
subject.register
|
14
14
|
event_count.times do
|
15
|
-
subject.receive(LogStash::Event.new("message" => "
|
15
|
+
subject.receive(LogStash::Event.new("message" => "test", "type" => type))
|
16
16
|
end
|
17
17
|
end
|
18
18
|
|
@@ -73,9 +73,7 @@ describe "index template expected behavior", :integration => true do
|
|
73
73
|
end
|
74
74
|
|
75
75
|
it "make [geoip][location] a geo_point" do
|
76
|
-
|
77
|
-
insist { results["hits"]["total"] } == 1
|
78
|
-
insist { results["hits"]["hits"][0]["_source"]["geoip"]["location"] } == [ 0.0, 0.0 ]
|
76
|
+
expect(@es.indices.get_template(name: "logstash")["logstash"]["mappings"]["_default_"]["properties"]["geoip"]["properties"]["location"]["type"]).to eq("geo_point")
|
79
77
|
end
|
80
78
|
|
81
79
|
it "aggregate .raw results correctly " do
|
@@ -18,10 +18,12 @@ describe "outputs/elasticsearch" do
|
|
18
18
|
eso.client.send(:client).transport.options[:hosts].first
|
19
19
|
}
|
20
20
|
|
21
|
+
let(:do_register) { true }
|
22
|
+
|
21
23
|
around(:each) do |block|
|
22
|
-
eso.register
|
24
|
+
eso.register if do_register
|
23
25
|
block.call()
|
24
|
-
eso.close
|
26
|
+
eso.close if do_register
|
25
27
|
end
|
26
28
|
|
27
29
|
describe "getting a document type" do
|
@@ -78,6 +80,56 @@ describe "outputs/elasticsearch" do
|
|
78
80
|
expect(manticore_host).to include(options["path"])
|
79
81
|
end
|
80
82
|
end
|
83
|
+
|
84
|
+
context "with a URI based path" do
|
85
|
+
let(:options) do
|
86
|
+
o = super()
|
87
|
+
o.delete("path")
|
88
|
+
o["hosts"] = ["http://localhost:9200/mypath/"]
|
89
|
+
o
|
90
|
+
end
|
91
|
+
let(:client_host_path) { URI.parse(eso.client.client_options[:hosts].first).path }
|
92
|
+
|
93
|
+
it "should initialize without error" do
|
94
|
+
expect { eso }.not_to raise_error
|
95
|
+
end
|
96
|
+
|
97
|
+
it "should use the URI path" do
|
98
|
+
expect(client_host_path).to eql("/mypath/")
|
99
|
+
end
|
100
|
+
|
101
|
+
context "with a path option but no URL path" do
|
102
|
+
let(:options) do
|
103
|
+
o = super()
|
104
|
+
o["path"] = "/override/"
|
105
|
+
o["hosts"] = ["http://localhost:9200"]
|
106
|
+
o
|
107
|
+
end
|
108
|
+
|
109
|
+
it "should initialize without error" do
|
110
|
+
expect { eso }.not_to raise_error
|
111
|
+
end
|
112
|
+
|
113
|
+
it "should use the option path" do
|
114
|
+
expect(client_host_path).to eql("/override/")
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
118
|
+
# If you specify the path in two spots that is an error!
|
119
|
+
context "with a path option and a URL path" do
|
120
|
+
let(:do_register) { false } # Register will fail
|
121
|
+
let(:options) do
|
122
|
+
o = super()
|
123
|
+
o["path"] = "/override"
|
124
|
+
o["hosts"] = ["http://localhost:9200/mypath/"]
|
125
|
+
o
|
126
|
+
end
|
127
|
+
|
128
|
+
it "should initialize with an error" do
|
129
|
+
expect { eso.register }.to raise_error(LogStash::ConfigurationError)
|
130
|
+
end
|
131
|
+
end
|
132
|
+
end
|
81
133
|
end
|
82
134
|
describe "without a port specified" do
|
83
135
|
it "should properly set the default port (9200) on the HTTP client" do
|
metadata
CHANGED
@@ -1,19 +1,19 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-output-elasticsearch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.7.
|
4
|
+
version: 2.7.1
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Elastic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-06-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
15
15
|
requirements:
|
16
|
-
- -
|
16
|
+
- - ">="
|
17
17
|
- !ruby/object:Gem::Version
|
18
18
|
version: '0'
|
19
19
|
name: concurrent-ruby
|
@@ -21,16 +21,16 @@ dependencies:
|
|
21
21
|
type: :runtime
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|
29
29
|
requirements:
|
30
|
-
- -
|
30
|
+
- - ">="
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 1.0.13
|
33
|
-
- - ~>
|
33
|
+
- - "~>"
|
34
34
|
- !ruby/object:Gem::Version
|
35
35
|
version: '1.0'
|
36
36
|
name: elasticsearch
|
@@ -38,19 +38,19 @@ dependencies:
|
|
38
38
|
type: :runtime
|
39
39
|
version_requirements: !ruby/object:Gem::Requirement
|
40
40
|
requirements:
|
41
|
-
- -
|
41
|
+
- - ">="
|
42
42
|
- !ruby/object:Gem::Version
|
43
43
|
version: 1.0.13
|
44
|
-
- - ~>
|
44
|
+
- - "~>"
|
45
45
|
- !ruby/object:Gem::Version
|
46
46
|
version: '1.0'
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
requirement: !ruby/object:Gem::Requirement
|
49
49
|
requirements:
|
50
|
-
- -
|
50
|
+
- - ">="
|
51
51
|
- !ruby/object:Gem::Version
|
52
52
|
version: 0.0.17
|
53
|
-
- - ~>
|
53
|
+
- - "~>"
|
54
54
|
- !ruby/object:Gem::Version
|
55
55
|
version: '0.0'
|
56
56
|
name: stud
|
@@ -58,16 +58,16 @@ dependencies:
|
|
58
58
|
type: :runtime
|
59
59
|
version_requirements: !ruby/object:Gem::Requirement
|
60
60
|
requirements:
|
61
|
-
- -
|
61
|
+
- - ">="
|
62
62
|
- !ruby/object:Gem::Version
|
63
63
|
version: 0.0.17
|
64
|
-
- - ~>
|
64
|
+
- - "~>"
|
65
65
|
- !ruby/object:Gem::Version
|
66
66
|
version: '0.0'
|
67
67
|
- !ruby/object:Gem::Dependency
|
68
68
|
requirement: !ruby/object:Gem::Requirement
|
69
69
|
requirements:
|
70
|
-
- - ~>
|
70
|
+
- - "~>"
|
71
71
|
- !ruby/object:Gem::Version
|
72
72
|
version: '0.6'
|
73
73
|
name: cabin
|
@@ -75,13 +75,13 @@ dependencies:
|
|
75
75
|
type: :runtime
|
76
76
|
version_requirements: !ruby/object:Gem::Requirement
|
77
77
|
requirements:
|
78
|
-
- - ~>
|
78
|
+
- - "~>"
|
79
79
|
- !ruby/object:Gem::Version
|
80
80
|
version: '0.6'
|
81
81
|
- !ruby/object:Gem::Dependency
|
82
82
|
requirement: !ruby/object:Gem::Requirement
|
83
83
|
requirements:
|
84
|
-
- - ~>
|
84
|
+
- - "~>"
|
85
85
|
- !ruby/object:Gem::Version
|
86
86
|
version: '1.0'
|
87
87
|
name: logstash-core-plugin-api
|
@@ -89,13 +89,13 @@ dependencies:
|
|
89
89
|
type: :runtime
|
90
90
|
version_requirements: !ruby/object:Gem::Requirement
|
91
91
|
requirements:
|
92
|
-
- - ~>
|
92
|
+
- - "~>"
|
93
93
|
- !ruby/object:Gem::Version
|
94
94
|
version: '1.0'
|
95
95
|
- !ruby/object:Gem::Dependency
|
96
96
|
requirement: !ruby/object:Gem::Requirement
|
97
97
|
requirements:
|
98
|
-
- - ~>
|
98
|
+
- - "~>"
|
99
99
|
- !ruby/object:Gem::Version
|
100
100
|
version: 0.0.42
|
101
101
|
name: ftw
|
@@ -103,13 +103,13 @@ dependencies:
|
|
103
103
|
type: :development
|
104
104
|
version_requirements: !ruby/object:Gem::Requirement
|
105
105
|
requirements:
|
106
|
-
- - ~>
|
106
|
+
- - "~>"
|
107
107
|
- !ruby/object:Gem::Version
|
108
108
|
version: 0.0.42
|
109
109
|
- !ruby/object:Gem::Dependency
|
110
110
|
requirement: !ruby/object:Gem::Requirement
|
111
111
|
requirements:
|
112
|
-
- -
|
112
|
+
- - ">="
|
113
113
|
- !ruby/object:Gem::Version
|
114
114
|
version: '0'
|
115
115
|
name: logstash-codec-plain
|
@@ -117,16 +117,16 @@ dependencies:
|
|
117
117
|
type: :development
|
118
118
|
version_requirements: !ruby/object:Gem::Requirement
|
119
119
|
requirements:
|
120
|
-
- -
|
120
|
+
- - ">="
|
121
121
|
- !ruby/object:Gem::Version
|
122
122
|
version: '0'
|
123
123
|
- !ruby/object:Gem::Dependency
|
124
124
|
requirement: !ruby/object:Gem::Requirement
|
125
125
|
requirements:
|
126
|
-
- -
|
126
|
+
- - ">="
|
127
127
|
- !ruby/object:Gem::Version
|
128
128
|
version: 0.5.4
|
129
|
-
- - <
|
129
|
+
- - "<"
|
130
130
|
- !ruby/object:Gem::Version
|
131
131
|
version: 1.0.0
|
132
132
|
name: manticore
|
@@ -134,16 +134,16 @@ dependencies:
|
|
134
134
|
type: :runtime
|
135
135
|
version_requirements: !ruby/object:Gem::Requirement
|
136
136
|
requirements:
|
137
|
-
- -
|
137
|
+
- - ">="
|
138
138
|
- !ruby/object:Gem::Version
|
139
139
|
version: 0.5.4
|
140
|
-
- - <
|
140
|
+
- - "<"
|
141
141
|
- !ruby/object:Gem::Version
|
142
142
|
version: 1.0.0
|
143
143
|
- !ruby/object:Gem::Dependency
|
144
144
|
requirement: !ruby/object:Gem::Requirement
|
145
145
|
requirements:
|
146
|
-
- -
|
146
|
+
- - ">="
|
147
147
|
- !ruby/object:Gem::Version
|
148
148
|
version: '0'
|
149
149
|
name: logstash-devutils
|
@@ -151,13 +151,13 @@ dependencies:
|
|
151
151
|
type: :development
|
152
152
|
version_requirements: !ruby/object:Gem::Requirement
|
153
153
|
requirements:
|
154
|
-
- -
|
154
|
+
- - ">="
|
155
155
|
- !ruby/object:Gem::Version
|
156
156
|
version: '0'
|
157
157
|
- !ruby/object:Gem::Dependency
|
158
158
|
requirement: !ruby/object:Gem::Requirement
|
159
159
|
requirements:
|
160
|
-
- -
|
160
|
+
- - ">="
|
161
161
|
- !ruby/object:Gem::Version
|
162
162
|
version: '0'
|
163
163
|
name: longshoreman
|
@@ -165,13 +165,13 @@ dependencies:
|
|
165
165
|
type: :development
|
166
166
|
version_requirements: !ruby/object:Gem::Requirement
|
167
167
|
requirements:
|
168
|
-
- -
|
168
|
+
- - ">="
|
169
169
|
- !ruby/object:Gem::Version
|
170
170
|
version: '0'
|
171
171
|
- !ruby/object:Gem::Dependency
|
172
172
|
requirement: !ruby/object:Gem::Requirement
|
173
173
|
requirements:
|
174
|
-
- -
|
174
|
+
- - ">="
|
175
175
|
- !ruby/object:Gem::Version
|
176
176
|
version: '0'
|
177
177
|
name: flores
|
@@ -179,7 +179,7 @@ dependencies:
|
|
179
179
|
type: :development
|
180
180
|
version_requirements: !ruby/object:Gem::Requirement
|
181
181
|
requirements:
|
182
|
-
- -
|
182
|
+
- - ">="
|
183
183
|
- !ruby/object:Gem::Version
|
184
184
|
version: '0'
|
185
185
|
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
|
@@ -234,17 +234,17 @@ require_paths:
|
|
234
234
|
- lib
|
235
235
|
required_ruby_version: !ruby/object:Gem::Requirement
|
236
236
|
requirements:
|
237
|
-
- -
|
237
|
+
- - ">="
|
238
238
|
- !ruby/object:Gem::Version
|
239
239
|
version: '0'
|
240
240
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
241
241
|
requirements:
|
242
|
-
- -
|
242
|
+
- - ">="
|
243
243
|
- !ruby/object:Gem::Version
|
244
244
|
version: '0'
|
245
245
|
requirements: []
|
246
246
|
rubyforge_project:
|
247
|
-
rubygems_version: 2.4.
|
247
|
+
rubygems_version: 2.4.8
|
248
248
|
signing_key:
|
249
249
|
specification_version: 4
|
250
250
|
summary: Logstash Output to Elasticsearch
|