logstash-filter-elastic_integration 8.17.0-java → 9.0.0.prerelease01-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/version.rb +1 -1
- data/lib/logstash/filters/elastic_integration.rb +59 -11
- data/vendor/jar-dependencies/co/elastic/logstash-filter-elastic_integration/{8.17.0/logstash-filter-elastic_integration-8.17.0.jar → 9.0.0.prerelease01/logstash-filter-elastic_integration-9.0.0.prerelease01.jar} +0 -0
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '0489a4cef4db59e9827d5e18923051d17e631f751871c278e7430ff3b606f433'
|
4
|
+
data.tar.gz: ed2a4fd874e0f8bbfe2cb8e9f16f43ebe3efcdae7ab70c76efd6d1cc376feea2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0b3d15e6128d02d13859e1cc4306f918b7f0084f3ebdbbfcd81dae5f697ef0226edb373f8147b20af447b1e1e642b3f3a7aa46611f5eb4ee03e241c52a139b62
|
7
|
+
data.tar.gz: 75808874aca215b4b3c40c17cb9f5965038b4b41901b218ab16c0a47b0b36f55b95a151afb1c302e57384a703651db7058d83cb548cb177c0109b623228b1b76
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
9.0.0.prerelease01
|
@@ -8,4 +8,4 @@
|
|
8
8
|
########################################################################
|
9
9
|
|
10
10
|
require 'jar_dependencies'
|
11
|
-
require_jar('co/elastic', 'logstash-filter-elastic_integration', '
|
11
|
+
require_jar('co/elastic', 'logstash-filter-elastic_integration', '9.0.0.prerelease01')
|
@@ -105,7 +105,7 @@ class LogStash::Filters::ElasticIntegration < LogStash::Filters::Base
|
|
105
105
|
# is not encumbered by those dependencies.
|
106
106
|
def initialize(*a, &b)
|
107
107
|
ensure_complete_logstash!
|
108
|
-
ensure_java_major_version!(
|
108
|
+
ensure_java_major_version!(21)
|
109
109
|
|
110
110
|
require_relative "elastic_integration/jar_dependencies"
|
111
111
|
require_relative "elastic_integration/event_api_bridge"
|
@@ -135,6 +135,7 @@ class LogStash::Filters::ElasticIntegration < LogStash::Filters::Base
|
|
135
135
|
initialize_event_processor!
|
136
136
|
|
137
137
|
perform_preflight_check!
|
138
|
+
check_versions_alignment
|
138
139
|
end # def register
|
139
140
|
|
140
141
|
def filter(event)
|
@@ -345,8 +346,8 @@ class LogStash::Filters::ElasticIntegration < LogStash::Filters::Base
|
|
345
346
|
|
346
347
|
if serverless?
|
347
348
|
@elasticsearch_rest_client = _elasticsearch_rest_client(config) do |builder|
|
348
|
-
|
349
|
-
|
349
|
+
builder.configureElasticApi { |elasticApi| elasticApi.setApiVersion(ELASTIC_API_VERSION) }
|
350
|
+
end
|
350
351
|
end
|
351
352
|
end
|
352
353
|
|
@@ -374,13 +375,24 @@ class LogStash::Filters::ElasticIntegration < LogStash::Filters::Base
|
|
374
375
|
end
|
375
376
|
|
376
377
|
def perform_preflight_check!
|
378
|
+
connected_es_version_info
|
377
379
|
check_user_privileges!
|
378
380
|
check_es_cluster_license!
|
379
381
|
end
|
380
382
|
|
381
|
-
def
|
383
|
+
def preflight_check_instance
|
382
384
|
java_import('co.elastic.logstash.filters.elasticintegration.PreflightCheck')
|
383
|
-
PreflightCheck.new(@elasticsearch_rest_client)
|
385
|
+
@preflight_check ||= PreflightCheck.new(@elasticsearch_rest_client)
|
386
|
+
end
|
387
|
+
|
388
|
+
def connected_es_version_info
|
389
|
+
@connected_es_version_info ||= preflight_check_instance.getElasticsearchVersionInfo
|
390
|
+
rescue => e
|
391
|
+
raise_config_error!(e.message)
|
392
|
+
end
|
393
|
+
|
394
|
+
def check_user_privileges!
|
395
|
+
preflight_check_instance.checkUserPrivileges
|
384
396
|
rescue => e
|
385
397
|
security_error_message = "no handler found for uri [/_security/user/_has_privileges]"
|
386
398
|
if e.message.include?(security_error_message)
|
@@ -403,17 +415,13 @@ class LogStash::Filters::ElasticIntegration < LogStash::Filters::Base
|
|
403
415
|
end
|
404
416
|
|
405
417
|
def check_es_cluster_license!
|
406
|
-
|
407
|
-
PreflightCheck.new(@elasticsearch_rest_client).checkLicense
|
418
|
+
preflight_check_instance.checkLicense
|
408
419
|
rescue => e
|
409
420
|
raise_config_error!(e.message)
|
410
421
|
end
|
411
422
|
|
412
423
|
def serverless?
|
413
|
-
|
414
|
-
PreflightCheck.new(@elasticsearch_rest_client).isServerless
|
415
|
-
rescue => e
|
416
|
-
raise_config_error!(e.message)
|
424
|
+
connected_es_version_info["build_flavor"] == 'serverless'
|
417
425
|
end
|
418
426
|
|
419
427
|
##
|
@@ -454,4 +462,44 @@ class LogStash::Filters::ElasticIntegration < LogStash::Filters::Base
|
|
454
462
|
ERR
|
455
463
|
end
|
456
464
|
end
|
465
|
+
|
466
|
+
##
|
467
|
+
# compares the current plugin version with the Elasticsearch version connected to
|
468
|
+
# generates a warning or info message based on the situation where the plugin is ahead or behind of the connected Elasticsearch
|
469
|
+
def check_versions_alignment
|
470
|
+
plugin_major_version, plugin_minor_version = VERSION.split('.').map(&:to_i)
|
471
|
+
es_major_version, es_minor_version = connected_es_version_info["number"].split('.').first(2).map(&:to_i)
|
472
|
+
|
473
|
+
logger.info("This #{VERSION} version of plugin embedded Ingest node components from Elasticsearch #{plugin_major_version}.#{plugin_minor_version}")
|
474
|
+
|
475
|
+
es_full_version = connected_es_version_info["number"]
|
476
|
+
|
477
|
+
if es_major_version > plugin_major_version
|
478
|
+
logger.warn "This plugin v#{VERSION} is connected to a newer MAJOR " +
|
479
|
+
"version of Elasticsearch v#{es_full_version}, and may " +
|
480
|
+
"have trouble loading or running pipelines that use new " +
|
481
|
+
"features; for the best experience, update this plugin " +
|
482
|
+
"to at least v#{es_major_version}.#{es_minor_version}."
|
483
|
+
elsif es_major_version < plugin_major_version
|
484
|
+
logger.warn "This plugin v#{VERSION} is connected to an older MAJOR " +
|
485
|
+
"version of Elasticsearch v#{es_full_version}, and may " +
|
486
|
+
"have trouble loading or running pipelines that use " +
|
487
|
+
"features that were deprecated before Elasticsearch " +
|
488
|
+
"v#{plugin_major_version}.0; for the best experience, " +
|
489
|
+
"align major/minor versions across the Elastic Stack."
|
490
|
+
elsif es_minor_version > plugin_minor_version
|
491
|
+
logger.warn "This plugin v#{VERSION} is connected to a newer MINOR " +
|
492
|
+
"version of Elasticsearch v#{es_full_version}, and may " +
|
493
|
+
"have trouble loading or running pipelines that use new " +
|
494
|
+
"features; for the best experience, update this plugin to " +
|
495
|
+
"at least v#{es_major_version}.#{es_minor_version}."
|
496
|
+
elsif es_minor_version < plugin_minor_version
|
497
|
+
logger.info "This plugin v#{VERSION} is connected to an older MINOR " +
|
498
|
+
"version of Elasticsearch v#{es_full_version}; for the best experience, " +
|
499
|
+
"align major/minor versions across the Elastic Stack."
|
500
|
+
else
|
501
|
+
logger.debug "This plugin v#{VERSION} is connected to the same MAJOR/MINOR " +
|
502
|
+
"version of Elasticsearch v#{es_full_version}."
|
503
|
+
end
|
504
|
+
end
|
457
505
|
end
|
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:
|
4
|
+
version: 9.0.0.prerelease01
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Elastic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-02-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -75,7 +75,7 @@ files:
|
|
75
75
|
- lib/logstash/filters/elastic_integration/jar_dependencies.rb
|
76
76
|
- lib/logstash/filters/elastic_integration/version.rb
|
77
77
|
- logstash-filter-elastic_integration.gemspec
|
78
|
-
- vendor/jar-dependencies/co/elastic/logstash-filter-elastic_integration/
|
78
|
+
- vendor/jar-dependencies/co/elastic/logstash-filter-elastic_integration/9.0.0.prerelease01/logstash-filter-elastic_integration-9.0.0.prerelease01.jar
|
79
79
|
homepage: https://www.elastic.co/logstash
|
80
80
|
licenses:
|
81
81
|
- ELv2
|
@@ -98,9 +98,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
98
98
|
version: '0'
|
99
99
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- - "
|
101
|
+
- - ">"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version:
|
103
|
+
version: 1.3.1
|
104
104
|
requirements: []
|
105
105
|
rubygems_version: 3.3.26
|
106
106
|
signing_key:
|