Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-5586

Update example of output for rs.status() in MongoDB 3.0

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Done
    • Icon: Trivial - P5 Trivial - P5
    • Server_Docs_20231030
    • None
    • manual
    • None

    Description

      New field for MongoDB 3.0

      In MongoDB 3.0, the output of rs.status() was slightly changed to add members.configVersion

      {
      	...
      	"members" : [
      		{
      			"_id" : 0,
      			"name" : "localhost:28010",
      			"health" : 1,
      			"state" : 1,
      			"stateStr" : "PRIMARY",
      			"uptime" : 89,
      			"optime" : Timestamp(1433802713, 1),
      			"optimeDate" : ISODate("2015-06-08T22:31:53Z"),
      			"electionTime" : Timestamp(1433802713, 2),
      			"electionDate" : ISODate("2015-06-08T22:31:53Z"),
      			"configVersion" : 1,                      <=================
      			"self" : true
      		}
      	],
      	"ok" : 1
      }
      

      This field configVersion is missing in http://docs.mongodb.org/manual/reference/command/replSetGetStatus/

      fix for 2.4

      At the following page: http://docs.mongodb.org/v2.4/reference/command/replSetGetStatus/, we show:

              {
                  "_id" : 0,
                  "name" : "m1.example.net:27017",
                  "health" : 1,
                  "state" : 1,
                  "stateStr" : "PRIMARY",
                  "uptime" : 269,
                  "optime" : Timestamp(1404225575, 11),
                  "optimeDate" : ISODate("2014-05-01T14:39:35Z"),
                  "electionTime" : Timestamp(1404225586, 1),
                  "electionDate" : ISODate("2014-05-01T14:39:46Z"),
                  "self" : true
              },
      

      There are no electionTime, neither electionData in 2.4

      Attachments

        Activity

          People

            kay.kim@mongodb.com Kay Kim (Inactive)
            daniel.coupal@mongodb.com Daniel Coupal
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              8 years, 32 weeks ago