Skip to content

Commit

Permalink
Ensure server + replicaset metrics are pulled for local host, not usi…
Browse files Browse the repository at this point in the history
…ng 'read preference'
  • Loading branch information
naemono committed Oct 2, 2017
1 parent f047ede commit 89f4dbc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/sensu-plugins-mongodb/metics.rb
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,7 @@ def get_mongo_client(db_name)
address_str = "#{host}:#{port}"
client_opts = {}
client_opts[:database] = db_name
client_opts[:connect] = :direct
unless db_user.nil?
client_opts[:user] = db_user
client_opts[:password] = db_password
Expand Down

0 comments on commit 89f4dbc

Please sign in to comment.