logstash-filter-elastic_integration 8.16.0-java → 8.16.1-java
Sign up to get free protection for your applications and to get access to all the features.
- 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 +58 -10
- data/vendor/jar-dependencies/co/elastic/logstash-filter-elastic_integration/{8.16.0/logstash-filter-elastic_integration-8.16.0.jar → 8.16.1/logstash-filter-elastic_integration-8.16.1.jar} +0 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9f35223224df1e39071c86969881c8e06f9d6c024c227fc4e1f2f8a171bd4640
|
4
|
+
data.tar.gz: a0a629d13474d8d78eb063ecca3bbc905b4db0f88d32128932db43ab88150b41
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 563d95a8916e0310b6804a2fae2479fa45078f41d5865d2ea86428d2b9d751068150e40eae0c6db9de704f63bce11bb7f3b11006825ae2cfa4535218a87b2c83
|
7
|
+
data.tar.gz: d959f8fde8a7675e726922a126d6e0c40ca59e4bdd65e181b927a795a6bd4fc4df79a0fd15bb705c081d67ca1faf534b9c5141310b42c21a45905ccf6a6c6ce2
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
8.16.
|
1
|
+
8.16.1
|
@@ -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: 8.16.
|
4
|
+
version: 8.16.1
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Elastic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-01-
|
11
|
+
date: 2025-01-28 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/8.16.
|
78
|
+
- vendor/jar-dependencies/co/elastic/logstash-filter-elastic_integration/8.16.1/logstash-filter-elastic_integration-8.16.1.jar
|
79
79
|
homepage: https://www.elastic.co/logstash
|
80
80
|
licenses:
|
81
81
|
- ELv2
|