Class: LogStash::Outputs::ElasticSearch::TemplateManager
- Inherits:
-
Object
- Object
- LogStash::Outputs::ElasticSearch::TemplateManager
- Defined in:
- lib/logstash/outputs/elasticsearch/template_manager.rb
Class Method Summary collapse
-
.install_template(plugin) ⇒ Object
To be mixed into the elasticsearch plugin base.
Class Method Details
.install_template(plugin) ⇒ Object
To be mixed into the elasticsearch plugin base
4 5 6 7 8 9 10 11 12 |
# File 'lib/logstash/outputs/elasticsearch/template_manager.rb', line 4 def self.install_template(plugin) return unless plugin.manage_template plugin.logger.info("Using mapping template from", :path => plugin.template) template = get_template(plugin.template, plugin.maximum_seen_major_version) plugin.logger.info("Attempting to install template", :manage_template => template) install(plugin.client, plugin.template_name, template, plugin.template_overwrite) rescue => e plugin.logger.error("Failed to install template.", :message => e., :class => e.class.name, :backtrace => e.backtrace) end |