Skip to content

Commit

Permalink
raise meaningful exception when ILM injection fails
Browse files Browse the repository at this point in the history
  • Loading branch information
yaauie committed Feb 1, 2023
1 parent b69294c commit d06ce4f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/logstash/outputs/elasticsearch/template_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ def self.add_ilm_settings_to_template(plugin, template)
plugin.logger.info("Overwriting index lifecycle name and rollover alias as ILM is enabled")
end
settings.update({ 'index.lifecycle.name' => plugin.ilm_policy, 'index.lifecycle.rollover_alias' => plugin.ilm_rollover_alias})
rescue Exception => e
fail("Failed to apply ILM settings to template: #{e.message}")
end

def self.template_settings(plugin, template)
Expand Down

0 comments on commit d06ce4f

Please sign in to comment.