diff --git a/lib/logstash/inputs/elasticsearch.rb b/lib/logstash/inputs/elasticsearch.rb index 5d24844..610eef2 100644 --- a/lib/logstash/inputs/elasticsearch.rb +++ b/lib/logstash/inputs/elasticsearch.rb @@ -151,6 +151,9 @@ class LogStash::Inputs::Elasticsearch < LogStash::Inputs::Base # SSL config :ssl, :validate => :boolean, :default => false + # ssl_certificate_verification - Disable ssl_verification with false + config :ssl_certificate_verification, :validate => :boolean, :default => true + # SSL Certificate Authority file in PEM encoded format, must also include any chain certificates as necessary config :ca_file, :validate => :path @@ -197,9 +200,12 @@ def register else @hosts end - ssl_options = { :ssl => true, :ca_file => @ca_file } if @ssl && @ca_file + + ssl_options = { :ssl => true, :ca_file => @ca_file, :verify => @ssl_certificate_verification } if @ssl && @ca_file + ssl_options ||= { :ssl => @ssl, :verify => @ssl_certificate_verification } if @ssl ssl_options ||= {} + @logger.warn "Supplied proxy setting (proxy => '') has no effect" if @proxy.eql?('') transport_options[:proxy] = @proxy.to_s if @proxy && !@proxy.eql?('')