Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-8203

Add replication section to serverStats.metrics

      Add the following counters and timers to serverStatus.metrics:

      "repl" : {
      	"apply" : { //applied operations on the replica (not primary)
      		"batches" : {
      			"num" : ##, //number of batches applied across all db active in the batch
      			"totalMillis" : ## //time to apply
      		},
      		"ops" : ## //applied operations
      	},
      	"buffer" : { //stuff to be applied, came off the network and in a holding pattern till the application threads start to work on it.
      		"count" : ##, //current count items in the buffer 
      		"maxSizeBytes" : ##, //max size of the buffer, in bytes
      		"sizeBytes" : ## //current size of the buffer, in bytes
      	},
      	"network" : { //network stats during replication from the source
      		"bytes" : ##, //the amount of data read from the replication source
      		"getmores" : {
      			"num" : ##, //number of getmore (batches) made to the source
      			"totalMillis" : ## //time taken to collect the data
      		},
      		"ops" : ##, //number of ops read from the source oplog
      		"readersCreated" : ## //number of oplog readers created -- this will happen if any error occurs on the connection (timeout, network loss, etc), if a new source is used for example
      	},
      	"oplog" : {
      		"insert" : {
      			"num" : ##, //entries inserted into the oplog
      			"totalMillis" : ## //time take to do the inserts
      		},
      		"insertBytes" : ## //the size (in bytes) that were inserted
      	},
      	"preload" : { //these number depend on the prefetch mode
      		"docs" : {
      			"num" : ##, //documents which were loaded before being updated
      			"totalMillis" : ## //time taken to load the docs
      		},
      		"indexes" : {
      			"num" : ##, //number of index entries loaded before updating the docuemtnes
      			"totalMillis" : ## //time taken to load the index entries
      		}
      	}
      }
      

            Assignee:
            scotthernandez Scott Hernandez (Inactive)
            Reporter:
            dan@mongodb.com Daniel Pasette (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: