Mongodb connection string

I have learned from the official documentation that I need to make a replica set for mongodb instances, but the way they are dns labelled in the env var of GRAYLOG_MONGODB_URI is something like : mongodb://mongo-mongodb-replicaset-0.mongo-mongodb-replicaset:27017,mongo-mongodb-replicaset-1.mongo-mongodb-replicaset.mongo:27017,mongo-mongodb-replicaset-2.mongo-mongodb-replicaset:27017/graylog?replicaSet=rs0 . But this looks like a stateful set and not a replicaset. What is that I need to make for mongodb ? Statefulset or replicaset. In case stateful what is the name=value pair for replicaSet=rs0 that comes at the end of the connection string ?

Please refer to the documentation for MongoDB connection strings at

Can you just exlaim me that repclicaSet=rs0 is used by graylog or mongodb ?

Please rephrase your question and take a look at the examples at

Rephrased : Do we require to set the replicaSet=rs0 in the mongo db connection string. In the link here they do not mention the “?replicaSet=rs0” options part in the mongo db connection string in the statefulsets. But in the mongo db connection string here : they do mention. Thanks.

When in question, use the format described in the MongoDB documentation.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.