logstash-output-elasticsearch 11.6.0-java → 11.7.0-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/CHANGELOG.md +3 -0
- data/docs/index.asciidoc +22 -5
- data/lib/logstash/outputs/elasticsearch.rb +8 -0
- data/lib/logstash/plugin_mixins/elasticsearch/api_configs.rb +6 -2
- data/lib/logstash/plugin_mixins/elasticsearch/common.rb +1 -1
- data/logstash-output-elasticsearch.gemspec +1 -1
- data/spec/unit/outputs/error_whitelist_spec.rb +2 -2
- 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: 0002c4b7258cc2493f3ab5e1ddadf6dc3f3e6d51c3585af9c93f9d9a578cf01f
|
4
|
+
data.tar.gz: 1f4b7e4587ee5831ac32f499dba2e73324f5b00578db20369b46e2b53b0fa874
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a45147a1fc1f7d73bae911f05417d36150796edae9bd7622c11dbeb35bebbc938c3eddc7d7f65652743dfe94425ba4b1cc6905eaae4390116e2fa19d5c1f4be3
|
7
|
+
data.tar.gz: 2ad8fec97436ac571436407711793d8a97055f7a2fbe986ce9f75417d0ce414a01467c900c47c08e1caa7eb6ffd7884edcabedb12b3684c5b40ed543c040fc21
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
## 11.7.0
|
2
|
+
- Feature: deprecates the `failure_type_logging_whitelist` configuration option, renaming it `silence_errors_in_log` [#1068](https://github.com/logstash-plugins/logstash-output-elasticsearch/pull/1068)
|
3
|
+
|
1
4
|
## 11.6.0
|
2
5
|
- Added support for `ca_trusted_fingerprint` when run on Logstash 8.3+ [#1074](https://github.com/logstash-plugins/logstash-output-elasticsearch/pull/1074)
|
3
6
|
|
data/docs/index.asciidoc
CHANGED
@@ -332,6 +332,7 @@ This plugin supports the following configuration options plus the
|
|
332
332
|
| <<plugins-{type}s-{plugin}-index>> |<<string,string>>|No
|
333
333
|
| <<plugins-{type}s-{plugin}-keystore>> |a valid filesystem path|No
|
334
334
|
| <<plugins-{type}s-{plugin}-keystore_password>> |<<password,password>>|No
|
335
|
+
| <<plugins-{type}s-{plugin}-silence_errors_in_log>> |<<array,array>>|No
|
335
336
|
| <<plugins-{type}s-{plugin}-manage_template>> |<<boolean,boolean>>|No
|
336
337
|
| <<plugins-{type}s-{plugin}-parameters>> |<<hash,hash>>|No
|
337
338
|
| <<plugins-{type}s-{plugin}-parent>> |<<string,string>>|No
|
@@ -584,9 +585,7 @@ of this setting affects the _default_ values of:
|
|
584
585
|
* Value type is <<array,array>>
|
585
586
|
* Default value is `[]`
|
586
587
|
|
587
|
-
|
588
|
-
A useful example is when you want to skip all 409 errors
|
589
|
-
which are `document_already_exists_exception`.
|
588
|
+
NOTE: Deprecated, refer to <<plugins-{type}s-{plugin}-silence_errors_in_log>>.
|
590
589
|
|
591
590
|
[id="plugins-{type}s-{plugin}-custom_headers"]
|
592
591
|
===== `custom_headers`
|
@@ -743,8 +742,7 @@ Indexes may not contain uppercase characters.
|
|
743
742
|
For weekly indexes ISO 8601 format is recommended, eg. logstash-%{+xxxx.ww}.
|
744
743
|
Logstash uses
|
745
744
|
http://www.joda.org/joda-time/apidocs/org/joda/time/format/DateTimeFormat.html[Joda
|
746
|
-
formats]
|
747
|
-
|
745
|
+
formats] and the `@timestamp` field of each event is being used as source for the date.
|
748
746
|
|
749
747
|
[id="plugins-{type}s-{plugin}-keystore"]
|
750
748
|
===== `keystore`
|
@@ -963,6 +961,25 @@ Set variable name passed to script (scripted update)
|
|
963
961
|
|
964
962
|
if enabled, script is in charge of creating non-existent document (scripted update)
|
965
963
|
|
964
|
+
[id="plugins-{type}s-{plugin}-silence_errors_in_log"]
|
965
|
+
===== `silence_errors_in_log`
|
966
|
+
|
967
|
+
* Value type is <<array,array>>
|
968
|
+
* Default value is `[]`
|
969
|
+
|
970
|
+
Defines the list of Elasticsearch errors that you don't want to log.
|
971
|
+
A useful example is when you want to skip all 409 errors
|
972
|
+
which are `document_already_exists_exception`.
|
973
|
+
|
974
|
+
[source,ruby]
|
975
|
+
output {
|
976
|
+
elasticsearch {
|
977
|
+
silence_errors_in_log => ["document_already_exists_exception"]
|
978
|
+
}
|
979
|
+
}
|
980
|
+
|
981
|
+
NOTE: Deprecates <<plugins-{type}s-{plugin}-failure_type_logging_whitelist>>.
|
982
|
+
|
966
983
|
[id="plugins-{type}s-{plugin}-sniffing"]
|
967
984
|
===== `sniffing`
|
968
985
|
|
@@ -266,6 +266,14 @@ class LogStash::Outputs::ElasticSearch < LogStash::Outputs::Base
|
|
266
266
|
end
|
267
267
|
|
268
268
|
def register
|
269
|
+
if !failure_type_logging_whitelist.empty?
|
270
|
+
log_message = "'failure_type_logging_whitelist' is deprecated and in a future version of Elasticsearch " +
|
271
|
+
"output plugin will be removed, please use 'silence_errors_in_log' instead."
|
272
|
+
@deprecation_logger.deprecated log_message
|
273
|
+
@logger.warn log_message
|
274
|
+
@silence_errors_in_log = silence_errors_in_log | failure_type_logging_whitelist
|
275
|
+
end
|
276
|
+
|
269
277
|
@after_successful_connection_done = Concurrent::AtomicBoolean.new(false)
|
270
278
|
@stopping = Concurrent::AtomicBoolean.new(false)
|
271
279
|
|
@@ -99,10 +99,14 @@ module LogStash; module PluginMixins; module ElasticSearch
|
|
99
99
|
# a timeout occurs, the request will be retried.
|
100
100
|
:timeout => { :validate => :number, :default => 60 },
|
101
101
|
|
102
|
-
#
|
102
|
+
# Deprecated, refer to `silence_errors_in_log`.
|
103
|
+
:failure_type_logging_whitelist => { :validate => :array, :default => [] },
|
104
|
+
|
105
|
+
# Defines the list of Elasticsearch errors that you don't want to log.
|
103
106
|
# A useful example is when you want to skip all 409 errors
|
104
107
|
# which are `document_already_exists_exception`.
|
105
|
-
|
108
|
+
# Deprecates `failure_type_logging_whitelist`.
|
109
|
+
:silence_errors_in_log => { :validate => :array, :default => [] },
|
106
110
|
|
107
111
|
# While the output tries to reuse connections efficiently we have a maximum.
|
108
112
|
# This sets the maximum number of open connections the output will create.
|
@@ -284,7 +284,7 @@ module LogStash; module PluginMixins; module ElasticSearch
|
|
284
284
|
end
|
285
285
|
|
286
286
|
def log_failure_type?(failure)
|
287
|
-
!
|
287
|
+
!silence_errors_in_log.include?(failure["type"])
|
288
288
|
end
|
289
289
|
|
290
290
|
# Rescue retryable errors during bulk submission
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'logstash-output-elasticsearch'
|
3
|
-
s.version = '11.
|
3
|
+
s.version = '11.7.0'
|
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"
|
@@ -45,8 +45,8 @@ describe "whitelisting error types in expected behavior" do
|
|
45
45
|
end
|
46
46
|
end
|
47
47
|
|
48
|
-
describe "when failure logging is disabled for
|
49
|
-
let(:settings) { super().merge("
|
48
|
+
describe "when failure logging is disabled for document exists error" do
|
49
|
+
let(:settings) { super().merge("silence_errors_in_log" => ["document_already_exists_exception"]) }
|
50
50
|
|
51
51
|
it "should log a failure on the action" do
|
52
52
|
expect(subject.logger).not_to have_received(:warn).with("Failed action", anything)
|
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.
|
4
|
+
version: 11.7.0
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Elastic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-08-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|