- Reference >
mongoshMethods >- Replication Methods >
- rs.conf()
rs.conf()¶
On this page
Definition¶
-
rs.conf()¶ Returns a document that contains the current replica set configuration.
The method wraps the
replSetGetConfigcommand.The
replSetGetConfigcommand can specify a new option commitmentStatus: true when run on the primary. When run with the option, the command includes in the output a commitmentStatus field. This output field indicates whether the replica set’s previous reconfig has been committed, so that the replica set is ready to be reconfigured again. The option is only available with thereplSetGetConfigcommand.
Output Example¶
The following document provides a representation of a replica set configuration document. The configuration of your replica set may include only a subset of these settings:
For description of the configuration settings, see Replica Set Configuration.
-
rs.config()¶ rs.config()is an alias ofrs.conf().