mirror of
https://github.com/elastic/logstash.git
synced 2025-04-25 07:07:54 -04:00
parent
70844f02d3
commit
1e4e0dbb8b
1 changed files with 1 additions and 5 deletions
|
@ -69,7 +69,7 @@ module LogStash module Modules class LogStashConfig
|
||||||
password = @settings["var.elasticsearch.password"]
|
password = @settings["var.elasticsearch.password"]
|
||||||
lines = ["hosts => #{hosts}", "index => \"#{index}\""]
|
lines = ["hosts => #{hosts}", "index => \"#{index}\""]
|
||||||
lines.push(user ? "user => \"#{user}\"" : nil)
|
lines.push(user ? "user => \"#{user}\"" : nil)
|
||||||
lines.push(password ? "password => \"#{password_value(password)}\"" : nil)
|
lines.push(password ? "password => \"#{password.value}\"" : nil)
|
||||||
lines.push(type_string ? "document_type => #{type_string}" : nil)
|
lines.push(type_string ? "document_type => #{type_string}" : nil)
|
||||||
lines.push("ssl => #{@settings.fetch('var.elasticsearch.ssl.enabled', false)}")
|
lines.push("ssl => #{@settings.fetch('var.elasticsearch.ssl.enabled', false)}")
|
||||||
if cacert = @settings["var.elasticsearch.ssl.certificate_authority"]
|
if cacert = @settings["var.elasticsearch.ssl.certificate_authority"]
|
||||||
|
@ -84,10 +84,6 @@ elasticsearch {
|
||||||
CONF
|
CONF
|
||||||
end
|
end
|
||||||
|
|
||||||
def password_value(password)
|
|
||||||
password.is_a?(LogStash::Util::Password) ? password.value : password
|
|
||||||
end
|
|
||||||
|
|
||||||
def config_string
|
def config_string
|
||||||
# process the template and settings
|
# process the template and settings
|
||||||
# send back as a string
|
# send back as a string
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue