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 https://docs.mongodb.com/manual/reference/connection-string/

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 https://docs.mongodb.com/manual/reference/connection-string/#standard-connection-string-format.

Rephrased : Do we require to set the replicaSet=rs0 in the mongo db connection string. In the link here https://github.com/Graylog2/graylog2-server/blob/2.2.3/misc/graylog.conf 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 : https://docs.mongodb.com/manual/reference/connection-string/#standard-connection-string-format they do mention. Thanks.

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