logstash-filter-elasticsearch 3.16.0 → 3.16.2
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/docs/index.asciidoc +2 -2
- data/lib/logstash/filters/elasticsearch/client.rb +2 -0
- data/logstash-filter-elasticsearch.gemspec +1 -1
- data/spec/filters/elasticsearch_spec.rb +6 -2
- metadata +11 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 77f05a757154f2f9e412dc4226296322180f27b0906a3a28a5b87a164531421c
|
4
|
+
data.tar.gz: 3262154d23afdec46fb84a583d88f2a7fa12b6c5282d36c9af4bc16d95aca1e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a85fc86abdf1546f600fd6878ce9775e437561eeaa3c5ad2da5963cd991c9b15383dfbab249b5d755d709ed404f6fc88c637f6df4348425318eb08ea091fc92c
|
7
|
+
data.tar.gz: 5398c04fe9c7aff2cc74e61f67aaab22da5280160c44fae8fdf7cc86cdb8fb62735eade95dca41bc53c7a7bb745af30e82fe2bfd715c8a959728e9a1d29e9e72
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
## 3.16.2
|
2
|
+
- Add `x-elastic-product-origin` header to Elasticsearch requests [#185](https://github.com/logstash-plugins/logstash-filter-elasticsearch/pull/185)
|
3
|
+
|
4
|
+
## 3.16.1
|
5
|
+
- Version bump to pick up doc fix in [#172](https://github.com/logstash-plugins/logstash-filter-elasticsearch/pull/172)
|
6
|
+
|
1
7
|
## 3.16.0
|
2
8
|
- Added request header `Elastic-Api-Version` for serverless [#174](https://github.com/logstash-plugins/logstash-filter-elasticsearch/pull/174)
|
3
9
|
|
data/docs/index.asciidoc
CHANGED
@@ -142,7 +142,7 @@ This plugin supports the following configuration options plus the <<plugins-{typ
|
|
142
142
|
| <<plugins-{type}s-{plugin}-query_template>> |<<string,string>>|No
|
143
143
|
| <<plugins-{type}s-{plugin}-result_size>> |<<number,number>>|No
|
144
144
|
| <<plugins-{type}s-{plugin}-retry_on_failure>> |<<number,number>>|No
|
145
|
-
| <<plugins-{type}s-{plugin}-retry_on_status>> |<<
|
145
|
+
| <<plugins-{type}s-{plugin}-retry_on_status>> |<<array,array>>|No
|
146
146
|
| <<plugins-{type}s-{plugin}-sort>> |<<string,string>>|No
|
147
147
|
| <<plugins-{type}s-{plugin}-ssl>> |<<boolean,boolean>>|__Deprecated__
|
148
148
|
| <<plugins-{type}s-{plugin}-ssl_certificate>> |<<path,path>>|No
|
@@ -354,7 +354,7 @@ When enabled, retry requests that result in connection errors or an HTTP status
|
|
354
354
|
[id="plugins-{type}s-{plugin}-retry_on_status"]
|
355
355
|
===== `retry_on_status`
|
356
356
|
|
357
|
-
* Value type is <<
|
357
|
+
* Value type is <<array,array>>
|
358
358
|
* Default value is an empty list `[]`
|
359
359
|
|
360
360
|
Which HTTP Status codes to consider for retries (in addition to connection errors) when using <<plugins-{type}s-{plugin}-retry_on_failure>>,
|
@@ -12,6 +12,7 @@ module LogStash
|
|
12
12
|
|
13
13
|
BUILD_FLAVOR_SERVERLESS = 'serverless'.freeze
|
14
14
|
DEFAULT_EAV_HEADER = { "Elastic-Api-Version" => "2023-10-31" }.freeze
|
15
|
+
INTERNAL_ORIGIN_HEADER = { 'x-elastic-product-origin' => 'logstash-filter-elasticsearch'}.freeze
|
15
16
|
|
16
17
|
def initialize(logger, hosts, options = {})
|
17
18
|
user = options.fetch(:user, nil)
|
@@ -25,6 +26,7 @@ module LogStash
|
|
25
26
|
transport_options[:headers].merge!(setup_basic_auth(user, password))
|
26
27
|
transport_options[:headers].merge!(setup_api_key(api_key))
|
27
28
|
transport_options[:headers].merge!({ 'user-agent' => "#{user_agent}" })
|
29
|
+
transport_options[:headers].merge!(INTERNAL_ORIGIN_HEADER)
|
28
30
|
|
29
31
|
transport_options[:pool_max] = 1000
|
30
32
|
transport_options[:pool_max_per_route] = 100
|
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
|
3
3
|
s.name = 'logstash-filter-elasticsearch'
|
4
|
-
s.version = '3.16.
|
4
|
+
s.version = '3.16.2'
|
5
5
|
s.licenses = ['Apache License (2.0)']
|
6
6
|
s.summary = "Copies fields from previous log events in Elasticsearch to current events "
|
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"
|
@@ -644,7 +644,7 @@ describe LogStash::Filters::Elasticsearch do
|
|
644
644
|
end
|
645
645
|
end
|
646
646
|
|
647
|
-
describe "Elastic Api
|
647
|
+
describe "Elastic Api and Product Origin Headers" do
|
648
648
|
let(:config) { {"query" => "*"} }
|
649
649
|
let(:plugin) { described_class.new(config) }
|
650
650
|
let(:headers) {{'x-elastic-product' => 'Elasticsearch'}}
|
@@ -666,6 +666,8 @@ describe LogStash::Filters::Elasticsearch do
|
|
666
666
|
plugin.register
|
667
667
|
client = plugin.send(:get_client).client
|
668
668
|
expect( extract_transport(client).options[:transport_options][:headers] ).to match hash_including("Elastic-Api-Version" => "2023-10-31")
|
669
|
+
expect( extract_transport(client).options[:transport_options][:headers] )
|
670
|
+
.to match hash_including("x-elastic-product-origin" => "logstash-filter-elasticsearch")
|
669
671
|
end
|
670
672
|
end
|
671
673
|
|
@@ -676,10 +678,12 @@ describe LogStash::Filters::Elasticsearch do
|
|
676
678
|
expect_any_instance_of(Elasticsearch::Client).to receive(:perform_request).with(any_args).and_return(mock_resp)
|
677
679
|
end
|
678
680
|
|
679
|
-
it 'does not propagate header to es client' do
|
681
|
+
it 'does not propagate Elastic-Api-Version header to es client' do
|
680
682
|
plugin.register
|
681
683
|
client = plugin.send(:get_client).client
|
682
684
|
expect( extract_transport(client).options[:transport_options][:headers] ).to match hash_not_including("Elastic-Api-Version" => "2023-10-31")
|
685
|
+
expect( extract_transport(client).options[:transport_options][:headers] )
|
686
|
+
.to match hash_including("x-elastic-product-origin" => "logstash-filter-elasticsearch")
|
683
687
|
end
|
684
688
|
end
|
685
689
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-filter-elasticsearch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.16.
|
4
|
+
version: 3.16.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elastic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-12-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -20,8 +20,8 @@ dependencies:
|
|
20
20
|
- !ruby/object:Gem::Version
|
21
21
|
version: '2.99'
|
22
22
|
name: logstash-core-plugin-api
|
23
|
-
prerelease: false
|
24
23
|
type: :runtime
|
24
|
+
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
@@ -37,8 +37,8 @@ dependencies:
|
|
37
37
|
- !ruby/object:Gem::Version
|
38
38
|
version: 7.14.9
|
39
39
|
name: elasticsearch
|
40
|
-
prerelease: false
|
41
40
|
type: :runtime
|
41
|
+
prerelease: false
|
42
42
|
version_requirements: !ruby/object:Gem::Requirement
|
43
43
|
requirements:
|
44
44
|
- - ">="
|
@@ -51,8 +51,8 @@ dependencies:
|
|
51
51
|
- !ruby/object:Gem::Version
|
52
52
|
version: 0.7.1
|
53
53
|
name: manticore
|
54
|
-
prerelease: false
|
55
54
|
type: :runtime
|
55
|
+
prerelease: false
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
57
|
requirements:
|
58
58
|
- - ">="
|
@@ -65,8 +65,8 @@ dependencies:
|
|
65
65
|
- !ruby/object:Gem::Version
|
66
66
|
version: '1.0'
|
67
67
|
name: logstash-mixin-ca_trusted_fingerprint_support
|
68
|
-
prerelease: false
|
69
68
|
type: :runtime
|
69
|
+
prerelease: false
|
70
70
|
version_requirements: !ruby/object:Gem::Requirement
|
71
71
|
requirements:
|
72
72
|
- - "~>"
|
@@ -79,8 +79,8 @@ dependencies:
|
|
79
79
|
- !ruby/object:Gem::Version
|
80
80
|
version: '1.0'
|
81
81
|
name: logstash-mixin-normalize_config_support
|
82
|
-
prerelease: false
|
83
82
|
type: :runtime
|
83
|
+
prerelease: false
|
84
84
|
version_requirements: !ruby/object:Gem::Requirement
|
85
85
|
requirements:
|
86
86
|
- - "~>"
|
@@ -93,8 +93,8 @@ dependencies:
|
|
93
93
|
- !ruby/object:Gem::Version
|
94
94
|
version: '0.6'
|
95
95
|
name: cabin
|
96
|
-
prerelease: false
|
97
96
|
type: :development
|
97
|
+
prerelease: false
|
98
98
|
version_requirements: !ruby/object:Gem::Requirement
|
99
99
|
requirements:
|
100
100
|
- - "~>"
|
@@ -107,8 +107,8 @@ dependencies:
|
|
107
107
|
- !ruby/object:Gem::Version
|
108
108
|
version: '0'
|
109
109
|
name: webrick
|
110
|
-
prerelease: false
|
111
110
|
type: :development
|
111
|
+
prerelease: false
|
112
112
|
version_requirements: !ruby/object:Gem::Requirement
|
113
113
|
requirements:
|
114
114
|
- - ">="
|
@@ -121,8 +121,8 @@ dependencies:
|
|
121
121
|
- !ruby/object:Gem::Version
|
122
122
|
version: '0'
|
123
123
|
name: logstash-devutils
|
124
|
-
prerelease: false
|
125
124
|
type: :development
|
125
|
+
prerelease: false
|
126
126
|
version_requirements: !ruby/object:Gem::Requirement
|
127
127
|
requirements:
|
128
128
|
- - ">="
|
@@ -195,7 +195,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
195
195
|
- !ruby/object:Gem::Version
|
196
196
|
version: '0'
|
197
197
|
requirements: []
|
198
|
-
rubygems_version: 3.
|
198
|
+
rubygems_version: 3.3.26
|
199
199
|
signing_key:
|
200
200
|
specification_version: 4
|
201
201
|
summary: Copies fields from previous log events in Elasticsearch to current events
|