Skip to content

connecting to mongo replicaset and using SSL as well #166

@UnP1u9

Description

@UnP1u9

Hey Guys,

I am trying to connect to mongo_replset using SRV record but am unable to connect,

using below config.

@type mongo_replset
connection_string mongodb+srv://username:password@mongo-server-srv-example.com/log_db?tls=true&authSource=admin&replicaSet=mongo-rep
ssl true
ssl_ca_cert /tmp/tls

it does not work with this config, I am creating all this using code so don't have names of nodes behind the mongo replica set (hosted on DigitalOcean).

config works when I put node name in host entry like below. but this is not the best way in production.

@type mongo_replset
host mongo-server-node-example.com:27017
replica_set mongo-repl
database db
user user
password "password"
ssl true
ssl_ca_cert /tmp/tls

Please suggest. Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions