logstash-filter-elastic_integration 0.0.2-java → 0.0.3-java
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/logstash/filters/elastic_integration/jar_dependencies.rb +1 -1
- data/lib/logstash/filters/elastic_integration.rb +19 -1
- data/vendor/jar-dependencies/co/elastic/logstash/plugins/filter/elasticintegration/logstash-filter-elastic_integration/{0.0.2/logstash-filter-elastic_integration-0.0.2.jar → 0.0.3/logstash-filter-elastic_integration-0.0.3.jar} +0 -0
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 245850625d596870d7536a1282f78419735370cf2d4b4a4d5ad51d59872f7de9
|
|
4
|
+
data.tar.gz: '017508efe2333faa598921431926a80f58cfaf7f2dae9c6b5a2d53a787bc296b'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3234009681fad3833eacd39a943661a61ae4541c4d4fe3df6f5c0f0516ca53bdf6da70eaf5890de460def6c231173c785c1a9a317c82be0275dc8ee79a99cf81
|
|
7
|
+
data.tar.gz: f5bc0d1effe8c21c5c7cdc69ffe265d8cbcc10f67ee32e4e64d43ea4d494618db78edf8d5e42d05e644bfb87d2862982fddc8df571f0d366a6bcb6685b16e545
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.0.
|
|
1
|
+
0.0.3
|
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
########################################################################
|
|
9
9
|
|
|
10
10
|
require 'jar_dependencies'
|
|
11
|
-
require_jar('co.elastic.logstash.plugins.filter.elasticintegration', 'logstash-filter-elastic_integration', '0.0.
|
|
11
|
+
require_jar('co.elastic.logstash.plugins.filter.elasticintegration', 'logstash-filter-elastic_integration', '0.0.3')
|
|
@@ -18,6 +18,7 @@ class LogStash::Filters::ElasticIntegration < LogStash::Filters::Base
|
|
|
18
18
|
ELASTICSEARCH_DEFAULT_PATH = '/'.freeze
|
|
19
19
|
HTTP_PROTOCOL = "http".freeze
|
|
20
20
|
HTTPS_PROTOCOL = "https".freeze
|
|
21
|
+
ELASTIC_API_VERSION = "2023-10-31".freeze
|
|
21
22
|
|
|
22
23
|
# Sets the host(s) of the remote instance. If given an array it will load balance
|
|
23
24
|
# requests across the hosts specified in the `hosts` parameter. Hosts can be any of
|
|
@@ -335,10 +336,21 @@ class LogStash::Filters::ElasticIntegration < LogStash::Filters::Base
|
|
|
335
336
|
|
|
336
337
|
def initialize_elasticsearch_rest_client!
|
|
337
338
|
java_import('co.elastic.logstash.filters.elasticintegration.ElasticsearchRestClientBuilder')
|
|
339
|
+
java_import('co.elastic.logstash.filters.elasticintegration.PreflightCheck')
|
|
338
340
|
|
|
339
|
-
|
|
341
|
+
config = extract_immutable_config
|
|
342
|
+
@elasticsearch_rest_client = ElasticsearchRestClientBuilder.fromPluginConfiguration(config)
|
|
340
343
|
.map(&:build)
|
|
341
344
|
.orElseThrow() # todo: ruby/java bridge better exception
|
|
345
|
+
|
|
346
|
+
if serverless?
|
|
347
|
+
@elasticsearch_rest_client = ElasticsearchRestClientBuilder.fromPluginConfiguration(config)
|
|
348
|
+
.map do |builder|
|
|
349
|
+
builder.configureElasticApi { |elasticApi| elasticApi.setApiVersion(ELASTIC_API_VERSION) }
|
|
350
|
+
end
|
|
351
|
+
.map(&:build)
|
|
352
|
+
.orElseThrow()
|
|
353
|
+
end
|
|
342
354
|
end
|
|
343
355
|
|
|
344
356
|
def initialize_event_processor!
|
|
@@ -397,6 +409,12 @@ class LogStash::Filters::ElasticIntegration < LogStash::Filters::Base
|
|
|
397
409
|
raise_config_error!(e.message)
|
|
398
410
|
end
|
|
399
411
|
|
|
412
|
+
def serverless?
|
|
413
|
+
PreflightCheck.new(@elasticsearch_rest_client).isServerless
|
|
414
|
+
rescue => e
|
|
415
|
+
raise_config_error!(e.message)
|
|
416
|
+
end
|
|
417
|
+
|
|
400
418
|
##
|
|
401
419
|
# single-use helper to ensure the running Logstash is a _complete_ distro that has
|
|
402
420
|
# non-OSS features active. Runtime detection mechanism relies on LogStash::OSS,
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: logstash-filter-elastic_integration
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.3
|
|
5
5
|
platform: java
|
|
6
6
|
authors:
|
|
7
7
|
- Elastic
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2023-
|
|
11
|
+
date: 2023-10-04 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -73,7 +73,7 @@ files:
|
|
|
73
73
|
- lib/logstash/filters/elastic_integration/event_api_bridge.rb
|
|
74
74
|
- lib/logstash/filters/elastic_integration/jar_dependencies.rb
|
|
75
75
|
- logstash-filter-elastic_integration.gemspec
|
|
76
|
-
- vendor/jar-dependencies/co/elastic/logstash/plugins/filter/elasticintegration/logstash-filter-elastic_integration/0.0.
|
|
76
|
+
- vendor/jar-dependencies/co/elastic/logstash/plugins/filter/elasticintegration/logstash-filter-elastic_integration/0.0.3/logstash-filter-elastic_integration-0.0.3.jar
|
|
77
77
|
homepage: http://www.elastic.co/guide/en/logstash/current/index.html
|
|
78
78
|
licenses:
|
|
79
79
|
- ELv2
|
|
@@ -100,7 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
100
100
|
- !ruby/object:Gem::Version
|
|
101
101
|
version: '0'
|
|
102
102
|
requirements: []
|
|
103
|
-
rubygems_version: 3.2.
|
|
103
|
+
rubygems_version: 3.2.33
|
|
104
104
|
signing_key:
|
|
105
105
|
specification_version: 4
|
|
106
106
|
summary: Processes Elastic Integrations
|