Skip to content

Commit 0e4f213

Browse files
authored
allow dlq_ settings when using data streams (#1144)
1 parent 13f3634 commit 0e4f213

File tree

5 files changed

+16
-11
lines changed

5 files changed

+16
-11
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 11.15.9
2+
- allow dlq_ settings when using data streams [#1144](https://github.com/logstash-plugins/logstash-output-elasticsearch/pull/1144)
3+
14
## 11.15.8
25
- Fixes a regression introduced in 11.14.0 which could prevent Logstash 8.8 from establishing a connection to Elasticsearch for Central Management and Monitoring core features [#1141](https://github.com/logstash-plugins/logstash-output-elasticsearch/issues/1141)
36

lib/logstash/outputs/elasticsearch.rb

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -267,14 +267,6 @@ class LogStash::Outputs::ElasticSearch < LogStash::Outputs::Base
267267
# ILM policy to use, if undefined the default policy will be used.
268268
config :ilm_policy, :validate => :string, :default => DEFAULT_POLICY
269269

270-
# List extra HTTP's error codes that are considered valid to move the events into the dead letter queue.
271-
# It's considered a configuration error to re-use the same predefined codes for success, DLQ or conflict.
272-
# The option accepts a list of natural numbers corresponding to HTTP errors codes.
273-
config :dlq_custom_codes, :validate => :number, :list => true, :default => []
274-
275-
# if enabled, failed index name interpolation events go into dead letter queue.
276-
config :dlq_on_failed_indexname_interpolation, :validate => :boolean, :default => true
277-
278270
attr_reader :client
279271
attr_reader :default_index
280272
attr_reader :default_ilm_rollover_alias

lib/logstash/plugin_mixins/elasticsearch/api_configs.rb

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,15 @@ module APIConfigs
213213
:retry_initial_interval => { :validate => :number, :default => 2 },
214214

215215
# Set max interval in seconds between bulk retries.
216-
:retry_max_interval => { :validate => :number, :default => 64 }
216+
:retry_max_interval => { :validate => :number, :default => 64 },
217+
218+
# List extra HTTP's error codes that are considered valid to move the events into the dead letter queue.
219+
# It's considered a configuration error to re-use the same predefined codes for success, DLQ or conflict.
220+
# The option accepts a list of natural numbers corresponding to HTTP errors codes.
221+
:dlq_custom_codes => { :validate => :number, :list => true, :default => [] },
222+
223+
# if enabled, failed index name interpolation events go into dead letter queue.
224+
:dlq_on_failed_indexname_interpolation => { :validate => :boolean, :default => true }
217225
}.freeze
218226

219227
def self.included(base)

logstash-output-elasticsearch.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Gem::Specification.new do |s|
22
s.name = 'logstash-output-elasticsearch'
3-
s.version = '11.15.8'
3+
s.version = '11.15.9'
44
s.licenses = ['apache-2.0']
55
s.summary = "Stores logs in Elasticsearch"
66
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"

spec/unit/outputs/elasticsearch/data_stream_support_spec.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,9 @@
164164
'data_stream_dataset' => 'any',
165165
'data_stream_namespace' => 'any',
166166
'data_stream_sync_fields' => true,
167-
'data_stream_auto_routing' => true)
167+
'data_stream_auto_routing' => true,
168+
'dlq_custom_codes' => [ 404 ],
169+
'dlq_on_failed_indexname_interpolation' => false)
168170
}
169171

170172
it 'should enable data-streams by default' do

0 commit comments

Comments
 (0)