mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 06:37:19 -04:00
Merge pull request #659 from bitsofinfo/master
Update mongodb.rb w/ fix for LOGSTASH-1371
This commit is contained in:
commit
beb84ff904
1 changed files with 3 additions and 1 deletions
|
@ -37,7 +37,9 @@ class LogStash::Outputs::Mongodb < LogStash::Outputs::Base
|
|||
conn = uriParsed.connection({})
|
||||
if uriParsed.auths.length > 0
|
||||
uriParsed.auths.each do |auth|
|
||||
conn.add_auth(auth['db_name'], auth['username'], auth['password'])
|
||||
if !auth['db_name'].nil?
|
||||
conn.add_auth(auth['db_name'], auth['username'], auth['password'], nil)
|
||||
end
|
||||
end
|
||||
conn.apply_saved_authentication()
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue