logstash-output-elasticsearch 10.8.2-java → 10.8.3-java
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4e7c81c4ce31203196fe4f6c377ea7785cc737b72aaa12abcd9afa7c625a7f72
|
4
|
+
data.tar.gz: 77257a5df5d92a5d06a75428e525fc9857123ed72e295b405dce451be27954b7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5c1dc510523d80daee4de75bf4c06b8eba9c0e76938b23aa109ce039e3ed6d74bdfe01fad435d4c8c18f07f0099e58ef5ea8dbb2013109dfec61c754c47df6fa
|
7
|
+
data.tar.gz: 6bbedbb413d9149ba205b77bff647b09a69bfb8ce2abb3396e81cb1d2e45a6ae6e8f21be3eeb86306e83c85d8a7a542b7e8ab3ff918178ace885a49ce94fc9b9
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
## 10.8.3
|
2
|
+
- Avoid to implicitly set deprecated type to `_doc` when connects to Elasticsearch version 7.x [#994](https://github.com/logstash-plugins/logstash-output-elasticsearch/pull/994)
|
3
|
+
|
1
4
|
## 10.8.2
|
2
5
|
- [DOC] Update links to use shared attributes [#985](https://github.com/logstash-plugins/logstash-output-elasticsearch/pull/985)
|
3
6
|
|
data/docs/index.asciidoc
CHANGED
@@ -40,7 +40,8 @@ the website landing page or in the {ref}[Elasticsearch documentation].
|
|
40
40
|
[NOTE]
|
41
41
|
================================================================================
|
42
42
|
When connected to Elasticsearch 7.x, modern versions of this plugin
|
43
|
-
use the
|
43
|
+
don't use the document-type when inserting documents, unless the user
|
44
|
+
explicitly sets <<plugins-{type}s-{plugin}-document_type>>.
|
44
45
|
|
45
46
|
If you are using an earlier version of Logstash and wish to connect to
|
46
47
|
Elasticsearch 7.x, first upgrade Logstash to version 6.8 to ensure it
|
@@ -417,7 +417,9 @@ class LogStash::Outputs::ElasticSearch < LogStash::Outputs::Base
|
|
417
417
|
# @param noop_required_client [nil]: required `nil` for legacy reasons.
|
418
418
|
# @return [Boolean]
|
419
419
|
def use_event_type?(noop_required_client)
|
420
|
-
|
420
|
+
# always set type for ES <= 6
|
421
|
+
# for ES 7 only set it if the user defined it
|
422
|
+
(maximum_seen_major_version < 7) || (maximum_seen_major_version == 7 && @document_type)
|
421
423
|
end
|
422
424
|
|
423
425
|
def install_template
|
@@ -4,9 +4,21 @@ require_relative "../../../spec/es_spec_helper"
|
|
4
4
|
describe "failures in bulk class expected behavior", :integration => true do
|
5
5
|
let(:template) { '{"template" : "not important, will be updated by :index"}' }
|
6
6
|
let(:event1) { LogStash::Event.new("somevalue" => 100, "@timestamp" => "2014-11-17T20:37:17.223Z", "@metadata" => {"retry_count" => 0}) }
|
7
|
-
let(:action1)
|
7
|
+
let(:action1) do
|
8
|
+
if ESHelper.es_version_satisfies?(">= 6", "< 7")
|
9
|
+
ESHelper.action_for_version(["index", {:_id=>nil, routing_field_name =>nil, :_index=>"logstash-2014.11.17", :_type=> doc_type }, event1])
|
10
|
+
else
|
11
|
+
ESHelper.action_for_version(["index", {:_id=>nil, routing_field_name =>nil, :_index=>"logstash-2014.11.17" }, event1])
|
12
|
+
end
|
13
|
+
end
|
8
14
|
let(:event2) { LogStash::Event.new("geoip" => { "location" => [ 0.0, 0.0] }, "@timestamp" => "2014-11-17T20:37:17.223Z", "@metadata" => {"retry_count" => 0}) }
|
9
|
-
let(:action2)
|
15
|
+
let(:action2) do
|
16
|
+
if ESHelper.es_version_satisfies?(">= 6", "< 7")
|
17
|
+
ESHelper.action_for_version(["index", {:_id=>nil, routing_field_name =>nil, :_index=>"logstash-2014.11.17", :_type=> doc_type }, event2])
|
18
|
+
else
|
19
|
+
ESHelper.action_for_version(["index", {:_id=>nil, routing_field_name =>nil, :_index=>"logstash-2014.11.17" }, event2])
|
20
|
+
end
|
21
|
+
end
|
10
22
|
let(:invalid_event) { LogStash::Event.new("geoip" => { "location" => "notlatlon" }, "@timestamp" => "2014-11-17T20:37:17.223Z") }
|
11
23
|
|
12
24
|
def mock_actions_with_response(*resp)
|
@@ -80,10 +80,10 @@ describe LogStash::Outputs::ElasticSearch do
|
|
80
80
|
describe "building an event action tuple" do
|
81
81
|
context "for 7.x elasticsearch clusters" do
|
82
82
|
let(:maximum_seen_major_version) { 7 }
|
83
|
-
it "should include '_type'" do
|
83
|
+
it "should not include '_type' when 'document_type' is not explicitly defined" do
|
84
84
|
action_tuple = subject.send(:event_action_tuple, LogStash::Event.new("type" => "foo"))
|
85
85
|
action_params = action_tuple[1]
|
86
|
-
expect(action_params).
|
86
|
+
expect(action_params).not_to include(:_type => "_doc")
|
87
87
|
end
|
88
88
|
|
89
89
|
context "with 'document type set'" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-output-elasticsearch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 10.8.
|
4
|
+
version: 10.8.3
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Elastic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-02-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|