Skip to content

Instantly share code, notes, and snippets.

@marianogg9
Last active January 13, 2017 14:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marianogg9/4031affeccd136084254b098d98b137c to your computer and use it in GitHub Desktop.
Save marianogg9/4031affeccd136084254b098d98b137c to your computer and use it in GitHub Desktop.
rs0:PRIMARY> rs.status()
{
"set" : "rs0",
"date" : ISODate("2017-01-13T14:34:14.190Z"),
"myState" : 1,
"members" : [
{
"_id" : 0,
"name" : "primary_hostname:27017",
"health" : 1,
"state" : 1,
"stateStr" : "PRIMARY",
"uptime" : 84799,
"optime" : Timestamp(1484309110, 5),
"optimeDate" : ISODate("2017-01-13T12:05:10Z"),
"electionTime" : Timestamp(1484233282, 2),
"electionDate" : ISODate("2017-01-12T15:01:22Z"),
"configVersion" : 3,
"self" : true
},
{
"_id" : 1,
"name" : "arbiter_hostname:27017",
"health" : 1,
"state" : 0,
"stateStr" : "STARTUP",
"uptime" : 84712,
"lastHeartbeat" : ISODate("2017-01-13T14:34:13.736Z"),
"lastHeartbeatRecv" : ISODate("1970-01-01T00:00:00Z"),
"pingMs" : 0,
"configVersion" : -2
},
{
"_id" : 2,
"name" : "secondary_hostname:27017",
"health" : 1,
"state" : 0,
"stateStr" : "STARTUP",
"uptime" : 84611,
"optime" : Timestamp(0, 0),
"optimeDate" : ISODate("1970-01-01T00:00:00Z"),
"lastHeartbeat" : ISODate("2017-01-13T14:34:13.760Z"),
"lastHeartbeatRecv" : ISODate("1970-01-01T00:00:00Z"),
"pingMs" : 1,
"configVersion" : -2
}
],
"ok" : 1
}
rs0:PRIMARY> rs.config()
{
"_id" : "rs0",
"version" : 3,
"members" : [
{
"_id" : 0,
"host" : "primary_hostname:27017",
"arbiterOnly" : false,
"buildIndexes" : true,
"hidden" : false,
"priority" : 1,
"tags" : {
},
"slaveDelay" : 0,
"votes" : 1
},
{
"_id" : 1,
"host" : "arbiter_hostname:27017",
"arbiterOnly" : true,
"buildIndexes" : true,
"hidden" : false,
"priority" : 1,
"tags" : {
},
"slaveDelay" : 0,
"votes" : 1
},
{
"_id" : 2,
"host" : "secondary_hostname:27017",
"arbiterOnly" : false,
"buildIndexes" : true,
"hidden" : false,
"priority" : 0,
"tags" : {
},
"slaveDelay" : 0,
"votes" : 1
}
],
"settings" : {
"chainingAllowed" : true,
"heartbeatTimeoutSecs" : 10,
"getLastErrorModes" : {
},
"getLastErrorDefaults" : {
"w" : 1,
"wtimeout" : 0
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment