rs.conf()
Definition
rs.
conf
()- Returns a document that contains the current replica setconfiguration.
The method wraps the replSetGetConfig
command.
Output Example
The following document provides a representation of a replica setconfiguration document. The configuration of your replica set mayinclude only a subset of these settings:
- {
- _id: <string>,
- version: <int>,
- protocolVersion: <number>,
- writeConcernMajorityJournalDefault: <boolean>,
- configsvr: <boolean>,
- members: [
- {
- _id: <int>,
- host: <string>,
- arbiterOnly: <boolean>,
- buildIndexes: <boolean>,
- hidden: <boolean>,
- priority: <number>,
- tags: <document>,
- slaveDelay: <int>,
- votes: <number>
- },
- ...
- ],
- settings: {
- chainingAllowed : <boolean>,
- heartbeatIntervalMillis : <int>,
- heartbeatTimeoutSecs: <int>,
- electionTimeoutMillis : <int>,
- catchUpTimeoutMillis : <int>,
- getLastErrorModes : <document>,
- getLastErrorDefaults : <document>,
- replicaSetId: <ObjectId>
- }
- }
For description of the configuration settings, seeReplica Set Configuration.
rs.
config
()rs.config()
is an alias ofrs.conf()
.