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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cd68d4f20c14d9cac712f5069acb4085abbd6ed2a3e7d88dc99e5337de810608
4
- data.tar.gz: c88b315e6cdd40597773a47be79c174e0c4b6a8aef8b355cef2e1f5bd6cdb536
3
+ metadata.gz: 0002c4b7258cc2493f3ab5e1ddadf6dc3f3e6d51c3585af9c93f9d9a578cf01f
4
+ data.tar.gz: 1f4b7e4587ee5831ac32f499dba2e73324f5b00578db20369b46e2b53b0fa874
5
5
  SHA512:
6
- metadata.gz: 44254336c7076ca9bf5289b753f4e472f1186a639a8f0572057b865b975a1e1f258598e30c2778b64782993a80a79456a42b88ef4c0915b17312de63362935c8
7
- data.tar.gz: 808cc047ba6a3020ab334c11dbc123e22777e62894ac39c5557563b670d7b3adb4aac5326e98d6e9c505cc83743a93ccbacefec7e8458d7d2b4651431654d451
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
- Set the Elasticsearch errors in the whitelist that you don't want to log.
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] for the index pattern from event timestamp.
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
- # Set the Elasticsearch errors in the whitelist that you don't want to log.
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
- :failure_type_logging_whitelist => { :validate => :array, :default => [] },
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
- !failure_type_logging_whitelist.include?(failure["type"])
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.6.0'
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 docuemnt exists error" do
49
- let(:settings) { super().merge("failure_type_logging_whitelist" => ["document_already_exists_exception"]) }
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.6.0
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-05-24 00:00:00.000000000 Z
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