Skip to content

Instantly share code, notes, and snippets.

@jaimemin
Created April 22, 2025 12:55
Show Gist options
  • Save jaimemin/18bbc7c57470a0e9b3a348f6c698c886 to your computer and use it in GitHub Desktop.
Save jaimemin/18bbc7c57470a0e9b3a348f6c698c886 to your computer and use it in GitHub Desktop.
> rs.status()
{
"set": "mdbDefGuide",
"date": ISODate("..."),
// 중략
"members": [
{
"_id": 0,
"name": "localhost:27017",
"health": 1,
"state": 1,
"stateStr": "PRIMARY",
"uptime": 688,
"optime": {
"ts": Timestamp(...),
"t": NumberLong(1)
},
"optimeDate": ISODate("..."),
"electionTime": Timestamp(...),
"electionDate": ISODate("..."),
"configVersion": 1,
"self": true
},
{
"_id": 1,
"name": "localhost:27018",
"health": 1,
"state": 2,
"stateStr": "SECONDARY",
"uptime": 500,
"optime": {
"ts": Timestamp(...),
"t": NumberLong(1)
},
"optimeDurable": {
"ts": Timestamp(...),
"t": NumberLong(1)
}
"optimeDate": ISODate("..."),
"optimeDurableDate": ISODate("..."),
"lastHeartbeat": ISODate("..."),
"lastHeartbeatRecv": ISODate("..."),
"pingMs": NumberLong(0),
"syncingTo": "localhost:27017",
"configVersion": 1
},
{
"_id": 2,
"name": "localhost:27019",
"health": 1,
"state": 2,
"stateStr": "SECONDARY",
"uptime": 500,
"optime": {
"ts": Timestamp(...),
"t": NumberLong(1)
},
"optimeDurable": {
"ts": Timestamp(...),
"t": NumberLong(1)
}
"optimeDate": ISODate("..."),
"optimeDurableDate": ISODate("..."),
"lastHeartbeat": ISODate("..."),
"lastHeartbeatRecv": ISODate("..."),
"pingMs": NumberLong(0),
"syncingTo": "localhost:27017",
"configVersion": 1
}
],
"ok": 1,
"operationTime": Timestamp("...")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment