logstash-output-elasticsearch 11.22.9-java → 11.22.11-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/http_client/manticore_adapter.rb +1 -1
- data/lib/logstash/outputs/elasticsearch/http_client/pool.rb +1 -8
- data/logstash-output-elasticsearch.gemspec +1 -1
- data/spec/integration/outputs/compressed_indexing_spec.rb +8 -1
- data/spec/integration/outputs/index_spec.rb +5 -2
- data/spec/unit/outputs/elasticsearch/http_client/manticore_adapter_spec.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 73430889fa821b0bd24a49c0278bd9be2f2107459025f2f31a3eb8a3d70f8261
|
4
|
+
data.tar.gz: 7848e77db848b7bac6faff43460b5206163380e6a4184510744f12f058ff6aa1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1541f0f7be5499378824a52628ade21c70a3e8370c94d12824e363deb654a47a600ffbee9d68bb77eb3cc087ae4fd07ff9b7e7b4494ccbd41c458eeccf44cb34
|
7
|
+
data.tar.gz: 2d4ef863c9c5c6051b62005488bb7f7872302d56430cc12be78e4df4e5e3db4a8a912e9ba7d7188defb4d0ea80d31db262a4ede46a43554d9b69f779ea7d4284
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
## 11.22.11
|
2
|
+
- Remove irrelevant log warning about elastic stack version [#1202](https://github.com/logstash-plugins/logstash-output-elasticsearch/pull/1202)
|
3
|
+
|
4
|
+
## 11.22.10
|
5
|
+
- Add `x-elastic-product-origin` header to Elasticsearch requests [#1195](https://github.com/logstash-plugins/logstash-output-elasticsearch/pull/1195)
|
6
|
+
|
1
7
|
## 11.22.9
|
2
8
|
- Vendor ECS template for Elasticsearch 9.x in built gem [#1188](https://github.com/logstash-plugins/logstash-output-elasticsearch/pull/1188)
|
3
9
|
|
@@ -2,7 +2,7 @@ require 'manticore'
|
|
2
2
|
require 'cgi'
|
3
3
|
|
4
4
|
module LogStash; module Outputs; class ElasticSearch; class HttpClient;
|
5
|
-
DEFAULT_HEADERS = { "Content-Type" => "application/json" }
|
5
|
+
DEFAULT_HEADERS = { "Content-Type" => "application/json", 'x-elastic-product-origin' => 'logstash-output-elasticsearch' }
|
6
6
|
|
7
7
|
class ManticoreAdapter
|
8
8
|
attr_reader :manticore, :logger
|
@@ -515,20 +515,13 @@ module LogStash; module Outputs; class ElasticSearch; class HttpClient;
|
|
515
515
|
major = major_version(version)
|
516
516
|
if @maximum_seen_major_version.nil?
|
517
517
|
@logger.info("Elasticsearch version determined (#{version})", es_version: major)
|
518
|
-
|
518
|
+
@maximum_seen_major_version = major
|
519
519
|
elsif major > @maximum_seen_major_version
|
520
520
|
warn_on_higher_major_version(major, url)
|
521
521
|
@maximum_seen_major_version = major
|
522
522
|
end
|
523
523
|
end
|
524
524
|
|
525
|
-
def set_maximum_seen_major_version(major)
|
526
|
-
if major >= 6
|
527
|
-
@logger.warn("Detected a 6.x and above cluster: the `type` event field won't be used to determine the document _type", es_version: major)
|
528
|
-
end
|
529
|
-
@maximum_seen_major_version = major
|
530
|
-
end
|
531
|
-
|
532
525
|
def warn_on_higher_major_version(major, url)
|
533
526
|
@logger.warn("Detected a node with a higher major version than previously observed, " +
|
534
527
|
"this could be the result of an Elasticsearch cluster upgrade",
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'logstash-output-elasticsearch'
|
3
|
-
s.version = '11.22.
|
3
|
+
s.version = '11.22.11'
|
4
4
|
s.licenses = ['apache-2.0']
|
5
5
|
s.summary = "Stores logs in Elasticsearch"
|
6
6
|
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"
|
@@ -32,6 +32,13 @@ end
|
|
32
32
|
let(:http_client) do
|
33
33
|
Manticore::Client.new(http_client_options)
|
34
34
|
end
|
35
|
+
let(:expected_headers) {
|
36
|
+
{
|
37
|
+
"Content-Encoding" => "gzip",
|
38
|
+
"Content-Type" => "application/json",
|
39
|
+
'x-elastic-product-origin' => 'logstash-output-elasticsearch'
|
40
|
+
}
|
41
|
+
}
|
35
42
|
|
36
43
|
before do
|
37
44
|
subject.register
|
@@ -64,7 +71,7 @@ end
|
|
64
71
|
|
65
72
|
it "sets the correct content-encoding header and body is compressed" do
|
66
73
|
expect(subject.client.pool.adapter.client).to receive(:send).
|
67
|
-
with(anything, anything, {:headers=>
|
74
|
+
with(anything, anything, {:headers=> expected_headers, :body => a_valid_gzip_encoded_string}).
|
68
75
|
and_call_original
|
69
76
|
subject.multi_receive(events)
|
70
77
|
end
|
@@ -214,10 +214,13 @@ describe "indexing" do
|
|
214
214
|
end
|
215
215
|
|
216
216
|
it "sets the correct content-type header" do
|
217
|
-
expected_manticore_opts = {
|
217
|
+
expected_manticore_opts = {
|
218
|
+
:headers => {"Content-Type" => "application/json", 'x-elastic-product-origin' => 'logstash-output-elasticsearch'},
|
219
|
+
:body => anything
|
220
|
+
}
|
218
221
|
if secure
|
219
222
|
expected_manticore_opts = {
|
220
|
-
:headers => {"Content-Type" => "application/json"},
|
223
|
+
:headers => {"Content-Type" => "application/json", 'x-elastic-product-origin' => 'logstash-output-elasticsearch'},
|
221
224
|
:body => anything,
|
222
225
|
:auth => {
|
223
226
|
:user => user,
|
@@ -34,7 +34,7 @@ describe LogStash::Outputs::ElasticSearch::HttpClient::ManticoreAdapter do
|
|
34
34
|
|
35
35
|
expect(subject.manticore).to receive(:get).
|
36
36
|
with(expected_uri.to_s, {
|
37
|
-
:headers =>
|
37
|
+
:headers => LogStash::Outputs::ElasticSearch::HttpClient::DEFAULT_HEADERS,
|
38
38
|
:auth => {
|
39
39
|
:user => user,
|
40
40
|
:password => password,
|
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: 11.22.
|
4
|
+
version: 11.22.11
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Elastic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-01-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|