serverStatus

Definition

  • serverStatus
  • The serverStatus command returns a document thatprovides an overview of the database’s state. Monitoringapplications can run this command at a regular interval tocollect statistics about the instance.

Syntax

The command has the following syntax:

  1. db.runCommand( { serverStatus: 1 } )

The value (i.e. 1 above) does not affect the operation of thecommand. The mongo shell provides thedb.serverStatus() wrapper for the command.

See also

Much of the output of serverStatus is also displayeddynamically by mongostat. See themongostat command for more information.

Behavior

By default, serverStatus excludes in its output some content inthe repl document.

To include fields that are excluded by default, specify the top-levelfield and set it to 1 in the command. To exclude fields that areincluded by default, specify the top-level field and set to 0 inthe command.

For example, the following operation suppresses the repl,metrics and locks information in the output.

  1. db.runCommand( { serverStatus: 1, repl: 0, metrics: 0, locks: 0 } )

The following example includesall repl information in the output:

  1. db.runCommand( { serverStatus: 1, repl: 1 } )

Output

Note

The output fields vary depending on the version of MongoDB,underlying operating system platform, the storage engine, and thekind of node, including mongos, mongod orreplica set member.

For the serverStatus output specific to the version ofyour MongoDB, refer to the appropriate version of the MongoDB Manual.

Instance Information

  1. "host" : <string>,
  2. "advisoryHostFQDNs" : <array>,
  3. "version" : <string>,
  4. "process" : <"mongod"|"mongos">,
  5. "pid" : <num>,
  6. "uptime" : <num>,
  7. "uptimeMillis" : <num>,
  8. "uptimeEstimate" : <num>,
  9. "localTime" : ISODate(""),
  • host
  • The system’s hostname. In Unix/Linux systems, this should be thesame as the output of the hostname command.
  • advisoryHostFQDNs

New in version 3.2.

An array of the system’s fully qualified domain names (FQDNs).

  • version
  • The MongoDB version of the current MongoDB process.
  • process
  • The current MongoDB process. Possible values are: mongos ormongod.
  • pid
  • The process id number.
  • uptime
  • The number of seconds that the current MongoDB process has beenactive.
  • uptimeMillis
  • The number of milliseconds that the current MongoDB process has beenactive.
  • uptimeEstimate
  • The uptime in seconds as calculated from MongoDB’s internalcourse-grained time keeping system.
  • localTime
  • The ISODate representing the current time, according to the server,in UTC.

asserts

  1. "asserts" : {
  2. "regular" : <num>,
  3. "warning" : <num>,
  4. "msg" : <num>,
  5. "user" : <num>,
  6. "rollovers" : <num>
  7. },
  • asserts
  • A document that reports on the number of assertions raised since theMongoDB process started. While assert errors are typically uncommon,if there are non-zero values for the asserts, you shouldcheck the log file for more information. In many cases, these errorsare trivial, but are worth investigating.
  • asserts.regular
  • The number of regular assertions raised since the MongoDB processstarted. Check the log file for more information about thesemessages.
  • asserts.warning

Changed in version 4.0.

Starting in MongoDB 4.0, the field returns zero 0.

In earlier versions, the field returns the number of warnings raisedsince the MongoDB process started.

  • asserts.msg
  • The number of message assertions raised since the MongoDB processstarted. Check the log file for more information about thesemessages.
  • asserts.user
  • The number of “user asserts” that have occurred since the last timethe MongoDB process started. These are errors that user maygenerate, such as out of disk space or duplicate key. You canprevent these assertions by fixing a problem with your applicationor deployment. Check the MongoDB log for more information.
  • asserts.rollovers
  • The number of times that the rollover counters have rolled oversince the last time the MongoDB process started. The counters willrollover to zero after 230 assertions. Use thisvalue to provide context to the other values in theasserts data structure.

connections

  1. "connections" : {
  2. "current" : <num>,
  3. "available" : <num>,
  4. "totalCreated" : <num>,
  5. "active" : <num>
  6. },
  • connections
  • A document that reports on the status of the connections. Use thesevalues to assess the current load and capacity requirements of theserver.
  • connections.current
  • The number of incoming connections from clients to the databaseserver . This number includes the current shell session. Considerthe value of connections.available to add morecontext to this datum.

The value will include all incoming connections including any shellconnections or connections from other servers, such asreplica set members or mongos instances.

  • connections.available
  • The number of unused incoming connections available. Consider thisvalue in combination with the value ofconnections.current to understand the connectionload on the database, and the UNIX ulimit Settings document formore information about system thresholds on available connections.
  • connections.totalCreated
  • Count of all incoming connections created to the server. Thisnumber includes connections that have since closed.
  • connections.active
  • The number of active client connections to the server. Active clientconnections refers to client connections that currently haveoperations in progress.

New in version 4.0.7.

electionMetrics

Available starting in 4.2.1 (and 4.0.13)

The electionMetrics section provides information on electionscalled by this mongod instance in a bid to become theprimary:

  1. "electionMetrics" : {
  2. "stepUpCmd" : {
  3. "called" : <NumberLong>,
  4. "successful" : <NumberLong>
  5. },
  6. "priorityTakeover" : {
  7. "called" : <NumberLong>,
  8. "successful" : <NumberLong>
  9. },
  10. "catchUpTakeover" : {
  11. "called" : <NumberLong>,
  12. "successful" : <NumberLong>
  13. },
  14. "electionTimeout" : {
  15. "called" : <NumberLong>,
  16. "successful" : <NumberLong>
  17. },
  18. "freezeTimeout" : {
  19. "called" : <NumberLong>,
  20. "successful" : <NumberLong>
  21. },
  22. "numStepDownsCausedByHigherTerm" : <NumberLong>,
  23. "numCatchUps" : <NumberLong>,
  24. "numCatchUpsSucceeded" : <NumberLong>,
  25. "numCatchUpsAlreadyCaughtUp" : <NumberLong>,
  26. "numCatchUpsSkipped" : <NumberLong>,
  27. "numCatchUpsTimedOut" : <NumberLong>,
  28. "numCatchUpsFailedWithError" :<NumberLong>,
  29. "numCatchUpsFailedWithNewTerm" : <NumberLong>,
  30. "numCatchUpsFailedWithReplSetAbortPrimaryCatchUpCmd" : <NumberLong>,
  31. "averageCatchUpOps" : <double>
  32. }
  • electionMetrics.stepUpCmd
  • Metrics on elections that were called by the mongodinstance as part of an election handoff when the primary stepped down.

The stepUpCmd includes both the number of electionscalled and the number of elections that succeeded.

Available starting in 4.2.1 (and 4.0.13)

  • electionMetrics.priorityTakeover
  • Metrics on elections that were called by the mongodinstance because its priority is higherthan the primary’s.

The electionMetrics.priorityTakeover includes both the number ofelections called and the number of elections that succeeded.

Available starting in 4.2.1 (and 4.0.13)

  • electionMetrics.catchUpTakeover
  • Metrics on elections called by the mongod instancebecause it is more-up-to-date than the primary.

The catchUpTakeover includes both the number ofelections called and the number of elections that succeeded.

See also

settings.catchUpTakeoverDelayMillis

Available starting in 4.2.1 (and 4.0.13)

The electionTimeout includes both the number ofelections called and the number of elections that succeeded.

See also

settings.electionTimeoutMillis

Available starting in 4.2.1 (and 4.0.13)

  • electionMetrics.freezeTimeout
  • Metrics on elections called by the mongod instanceafter its freeze period (during which themember cannot seek an election) has expired.

The electionMetrics.freezeTimeout includes both the number ofelections called and the number of elections that succeeded.

Available starting in 4.2.1 (and 4.0.13)

  • electionMetrics.numStepDownsCausedByHigherTerm
  • Number of times the mongod instance stepped downbecause it saw a higher term (i.e. other member/members haveparticipated in additional elections).

Available starting in 4.2.1 (and 4.0.13)

  • electionMetrics.numCatchUps
  • Number of elections where the mongod instance as thenewly-elected primary had to catch up to the highest known oplogentry.

Available starting in 4.2.1 (and 4.0.13)

  • electionMetrics.numCatchUpsSucceeded
  • Number of times the mongod instance as thenewly-elected primary successfully caught up to the highest knownoplog entry.

Available starting in 4.2.1 (and 4.0.13)

  • electionMetrics.numCatchUpsAlreadyCaughtUp
  • Number of times the mongod instance as thenewly-elected primary concluded its catchup process because it wasalready caught up when elected

Available starting in 4.2.1 (and 4.0.13)

  • electionMetrics.numCatchUpsSkipped
  • Number of times the mongod instance as thenewly-elected primary skipped the catchup process.

Available starting in 4.2.1 (and 4.0.13)

  • electionMetrics.numCatchUpsTimedOut
  • Number of times the mongod instance as thenewly-elected primary concluded its catchup process because of thesettings.catchUpTimeoutMillis limit.

Available starting in 4.2.1 (and 4.0.13)

  • electionMetrics.numCatchUpsFailedWithError
  • Number of times the newly-elected primary’s catchup process failedwith an error.

Available starting in 4.2.1 (and 4.0.13)

  • electionMetrics.numCatchUpsFailedWithNewTerm
  • Number of times the newly-elected primary’s catchup processconcluded because another member(s) had a higher term (i.e. othermember/members have participated in additional elections).

Available starting in 4.2.1 (and 4.0.13)

  • electionMetrics.numCatchUpsFailedWithReplSetAbortPrimaryCatchUpCmd
  • Number of times the newly-elected primary’s catchup processconcluded because the mongod received thereplSetAbortPrimaryCatchUp command.

Available starting in 4.2.1 (and 4.0.13)

  • electionMetrics.averageCatchUpOps
  • Average number of operations applied during the newly-electedprimary’s catchup processes.

Available starting in 4.2.1

extra_info

  1. "extra_info" : {
  2. "note" : "fields vary by platform.",
  3. "heap_usage_bytes" : <num>,
  4. "page_faults" : <num>
  5. },
  • extra_info
  • A document that provides additional information regarding theunderlying system.
  • extra_info.note
  • A string with the text "fields vary by platform."
  • extra_info.heap_usage_bytes
  • The total size in bytes of heap space used by the database process.Available on Unix/Linux systems only.
  • extra_info.page_faults
  • The total number of page faults. Theextra_info.page_faults counter may increasedramatically during moments of poor performance and may correlatewith limited memory environments and larger data sets. Limited andsporadic page faults do not necessarily indicate an issue.

Windows draws a distinction between “hard” page faults involvingdisk I/O, and “soft” page faults that only require moving pages inmemory. MongoDB counts both hard and soft page faults in thisstatistic.

flowControl

New in version 4.2.

  1. "flowControl" : {
  2. "enabled" : <boolean>,
  3. "targetRateLimit" : <int>,
  4. "timeAcquiringMicros" : <NumberLong>,
  5. "locksPerOp" : <double>,
  6. "sustainerRate" : <int>,
  7. "isLagged" : <boolean>,
  8. "isLaggedCount" : <int>,
  9. "isLaggedTimeMicros" : <NumberLong>,
  10. },
  • flowControl
  • A document that returns statistics on the Flow Control. Withflow control enabled, as the majority commit point lag growsclose to the flowControlTargetLagSeconds, writes on theprimary must obtain tickets before taking locks. As such, themetrics returned are meaningful when run on the primary.

New in version 4.2.

  • flowControl.enabled
  • A boolean that indicates whether Flow Control isenabled(true) or disabled (false).

See also enableFlowControl.

New in version 4.2.

  • flowControl.targetRateLimit
  • When run on the primary, the maximum number of tickets that can beacquired per second.

When run on a secondary, the returned number is a placeholder.

New in version 4.2.

  • flowControl.timeAcquiringMicros
  • When run on the primary, the total time write operations have waitedto acquire a ticket.

When run on a secondary, the returned number is a placeholder.

New in version 4.2.

  • flowControl.locksPerOp
  • When run on the primary, an approximation of the number of locks takenper operation.

When run on a secondary, the returned number is a placeholder.

New in version 4.2.

  • flowControl.sustainerRate
  • When run on the primary, an approximation of operations applied persecond by the secondary that is sustaining the commit point.

When run on a secondary, the returned number is a placeholder.

New in version 4.2.

  • flowControl.isLagged
  • When run on the primary, a boolean that indicates whether flowcontrol has engaged. Flow control engages when the majoritycommitted lag is greater than some percentage of the configuredflowControlTargetLagSeconds.

When run on a secondary, the returned boolean is a placeholder.

New in version 4.2.

  • flowControl.isLaggedCount
  • When run on a primary, the number of times flow control has engagedsince the last restart. Flow control engages when the majoritycommitted lag is greater than some percentage of theflowControlTargetLagSeconds.

When run on a secondary, the returned number is a placeholder.

New in version 4.2.

  • flowControl.isLaggedTimeMicros
  • When run on the primary, the amount of time flow control has spentbeing engaged since the last restart. Flow control engages when themajority committed lag is greater than some percentage of theflowControlTargetLagSeconds.

When run on a secondary, the returned number is a placeholder.

New in version 4.2.

freeMonitoring

  1. "freeMonitoring" : {
  2. "state" : <string>,
  3. "retryIntervalSecs" : <NumberLong>,
  4. "lastRunTime" : <string>,
  5. "registerErrors" : <NumberLong>,
  6. "metricsErrors" : <NumberLong>
  7. },
  • freeMonitoring.state
  • The enablement state of free monitoring. The values can be one ofthe following:

    • “enabled”
    • “disabled”
    • “pending” if the enable free monitoring encountered a registeration error.
  • freeMonitoring.retryIntervalSecs
  • The frequency, in seconds, at which data is uploaded.
  • freeMonitoring.lastRunTime
  • The date and time of the last run of the metrics upload.
  • freeMonitoring.registerErrors
  • The number of registration errors, incremented on unexpected HTTPstatus or network errors.
  • freeMonitoring.metricsErrors
  • The number of errors encountered when uploading metrics.

globalLock

  1. "globalLock" : {
  2. "totalTime" : <num>,
  3. "currentQueue" : {
  4. "total" : <num>,
  5. "readers" : <num>,
  6. "writers" : <num>
  7. },
  8. "activeClients" : {
  9. "total" : <num>,
  10. "readers" : <num>,
  11. "writers" : <num>
  12. }
  13. },
  • globalLock
  • A document that reports on the database’s lock state.

Generally, the locks document provides more detaileddata on lock uses.

  • globalLock.totalTime
  • The time, in microseconds, since the database last started andcreated the globalLock. This is roughly equivalentto total server uptime.
  • globalLock.currentQueue
  • A document that provides information concerning the number ofoperations queued because of a lock.

A consistently small queue, particularly of shorter operations,should cause no concern. TheglobalLock.activeClients readers and writersinformation provides context for this data.

  • globalLock.currentQueue.readers
  • The number of operations that are currently queued and waiting forthe read lock. A consistently small read-queue, particularly ofshorter operations, should cause no concern.
  • globalLock.currentQueue.writers
  • The number of operations that are currently queued and waiting forthe write lock. A consistently small write-queue, particularly ofshorter operations, is no cause for concern.
  • globalLock.activeClients
  • A document that provides information about the number of connectedclients and the read and write operations performed by these clients.

Use this data to provide context for theglobalLock.currentQueue data.

  • globalLock.activeClients.total
  • The total number of internal client connections to the databaseincluding system threads as well as queued readers and writers.This metric will be higher than the total of activeClients.readersand activeClients.writers due to the inclusion of system threads.
  • globalLock.activeClients.readers
  • The number of the active client connections performing readoperations.
  • globalLock.activeClients.writers
  • The number of active client connections performing write operations.

logicalSessionRecordCache

New in version 3.6.

  1. "logicalSessionRecordCache" : {
  2. "activeSessionsCount" : <num>,
  3. "sessionsCollectionJobCount" : <num>,
  4. "lastSessionsCollectionJobDurationMillis" : <num>,
  5. "lastSessionsCollectionJobTimestamp" : <Date>,
  6. "lastSessionsCollectionJobEntriesRefreshed" : <num>,
  7. "lastSessionsCollectionJobEntriesEnded" : <num>,
  8. "lastSessionsCollectionJobCursorsClosed" : <num>,
  9. "transactionReaperJobCount" : <num>,
  10. "lastTransactionReaperJobDurationMillis" : <num>,
  11. "lastTransactionReaperJobTimestamp" : <Date>,
  12. "lastTransactionReaperJobEntriesCleanedUp" : <num>,
  13. "sessionCatalogSize" : <num> // Starting in MongoDB 4.2
  14. },
  • logicalSessionRecordCache
  • Provides metrics around the caching of server sessions.
  • logicalSessionRecordCache.activeSessionsCount
  • The number of all active local sessions cached in memory by themongod or mongos instance since the lastrefresh period.

See also

  • logicalSessionRecordCache.sessionsCollectionJobCount
  • The number that tracks the number of times the refresh process hasrun on the config.system.sessions collection.

See also

logicalSessionRefreshMinutes

  • logicalSessionRecordCache.lastSessionsCollectionJobDurationMillis
  • The length in milliseconds of the last refresh.
  • logicalSessionRecordCache.lastSessionsCollectionJobTimestamp
  • The time at which the last refresh occurred.
  • logicalSessionRecordCache.lastSessionsCollectionJobEntriesRefreshed
  • The number of sessions that were refreshed during the last refresh.
  • logicalSessionRecordCache.lastSessionsCollectionJobEntriesEnded"
  • The number of sessions that ended during the last refresh.
  • logicalSessionRecordCache.lastSessionsCollectionJobCursorsClosed"
  • The number of cursors that were closed during the lastconfig.system.sessions collection refresh.
  • logicalSessionRecordCache.transactionReaperJobCount"
  • The number that tracks the number of times the transaction recordcleanup process has run on the config.transactionscollection.
  • logicalSessionRecordCache.lastTransactionReaperJobDurationMillis"
  • The length (in milleseconds) of the last transaction record cleanup.
  • logicalSessionRecordCache.lastTransactionReaperJobTimestamp"
  • The time of the last transaction record cleanup.
  • logicalSessionRecordCache.lastTransactionReaperJobEntriesCleanedUp"
  • The number of entries in the config.transactions collectionthat were deleted during the last transaction record cleanup.
  • logicalSessionRecordCache.sessionCatalogSize

New in version 4.2.

locks

  1. "locks" : {
  2. <type> : {
  3. "acquireCount" : {
  4. <mode> : NumberLong(<num>),
  5. ...
  6. },
  7. "acquireWaitCount" : {
  8. <mode> : NumberLong(<num>),
  9. ...
  10. },
  11. "timeAcquiringMicros" : {
  12. <mode> : NumberLong(<num>),
  13. ...
  14. },
  15. "deadlockCount" : {
  16. <mode> : NumberLong(<num>),
  17. ...
  18. }
  19. },
  20. ...
  • locks

Changed in version 3.0.

A document that reports for each lock <type>, data on lock<modes>.

The possible lock <types> are:

Lock TypeDescriptionParallelBatchWriterModeRepresents a lock for parallel batch writer mode.

In earlier versions, PBWM information was reported as part ofthe Global lock information.

New in version 4.2.

ReplicationStateTransitionRepresents lock taken for replica set member state transitions.

New in version 4.2.

GlobalRepresents global lock.DatabaseRepresents database lock.CollectionRepresents collection lock.MutexRepresents mutex.MetadataRepresents metadata lock.oplogRepresents lock on the oplog.

The possible <modes> are:

Lock ModeDescriptionRRepresents Shared (S) lock.WRepresents Exclusive (X) lock.rRepresents Intent Shared (IS) lock.wRepresents Intent Exclusive (IX) lock.

All values are of the NumberLong() type.

  • locks.<type>.acquireCount
  • Number of times the lock was acquired in the specified mode.
  • locks.<type>.acquireWaitCount
  • Number of times the locks.acquireCount lockacquisitions encountered waits because the locks were held in aconflicting mode.
  • locks.<type>.timeAcquiringMicros
  • Cumulative wait time in microseconds for the lock acquisitions.

locks.timeAcquiringMicros divided bylocks.acquireWaitCount gives anapproximate average wait time for the particular lock mode.

  • locks.<type>.deadlockCount
  • Number of times the lock acquisitions encountered deadlocks.

network

  1. "network" : {
  2. "bytesIn" : <num>,
  3. "bytesOut" : <num>,
  4. "numRequests" : <num>
  5. },
  • network
  • A document that reports data on MongoDB’s network use.
  • network.bytesIn
  • The number of bytes that reflects the amount of network trafficreceived by this database. Use this value to ensure that networktraffic sent to the mongod process is consistent withexpectations and overall inter-application traffic.
  • network.bytesOut
  • The number of bytes that reflects the amount of network traffic sentfrom this database. Use this value to ensure that network trafficsent by the mongod process is consistent withexpectations and overall inter-application traffic.
  • network.numRequests
  • The total number of distinct requests that the server has received.Use this value to provide context for thenetwork.bytesIn and network.bytesOutvalues to ensure that MongoDB’s network utilization is consistentwith expectations and application use.

opLatencies

Only for mongod instances

  1. "opLatencies" : {
  2. "reads" : <document>,
  3. "writes" : <document>,
  4. "commands" : <document>
  5. },
  • opLatencies
  • A document containing operation latencies for the database as a whole.See latencyStats Document for an description of this document.

Only mongod instances reportopLatencies.

  • opLatencies.reads
  • Latency statistics for read requests.
  • opLatencies.writes
  • Latency statistics for write operations.
  • opLatencies.commands
  • Latency statistics for database commands.

opReadConcernCounters

New in version 4.0.6.

Only for mongod instances

  1. "opReadConcernCounters" : {
  2. "available" : NumberLong(<num>),
  3. "linearizable" : NumberLong(<num>),
  4. "local" : NumberLong(<num>),
  5. "majority" : NumberLong(<num>),
  6. "snapshot" : NumberLong(<num>),
  7. "none" : NumberLong(<num>)
  8. }
  • opReadConcernCounters

New in version 4.0.6.

A document that reports on the read concern level specified by query operations to themongod instance since it last started.

Specified wDescription"available"Number of query operations that specified read concern level"available"."linearizable"Number of query operations that specified read concern level"linearizable"."local"Number of query operations that specified readconcern level "local"."majority"Number of query operations that specified readconcern level "majority"."snapshot"Number of query operations that specified readconcern level "snapshot"."none"Number of query operations that did not specify a readconcern level and instead used the default read concern level.

The sum of the opReadConcernCounters equalsopcounters.query.

opWriteConcernCounters

New in version 4.0.6.

Only for mongod instances

  1. "opWriteConcernCounters" : {
  2. "insert" : {
  3. "wmajority" : NumberLong(<num>),
  4. "wnum" : {
  5. "<num>" : NumberLong(<num>),
  6. ...
  7. },
  8. "wtag" : {
  9. "<tag1>" : NumberLong(<num>),
  10. ...
  11. },
  12. "none" : NumberLong(<num>)
  13. },
  14. "update" : {
  15. "wmajority" : NumberLong(<num>),
  16. "wnum" : {
  17. "<num>" : NumberLong(<num>),
  18. },
  19. "wtag" : {
  20. "<tag1>" : NumberLong(<num>),
  21. ...
  22. },
  23. "none" : NumberLong(<num>)
  24. },
  25. "delete" : {
  26. "wmajority" : NumberLong(<num>)
  27. "wnum" : {
  28. "<num>" : NumberLong(<num>),
  29. ...
  30. },
  31. "wtag" : {
  32. "<tag1>" : NumberLong(<num>),
  33. ...
  34. },
  35. "none" : NumberLong(<num>)
  36. }
  37. }
  • opWriteConcernCounters
  • A document that reports on the write concerns specified by write operations to themongod instance since it last started.

More specifically, the opWriteConcernCountersreports on the w: specified by the writeoperations. The journal flag option (j) and the timeout option(wtimeout) of the write concerns does not affect the count. Thecount is incremented even if the operation times out.

Note

Only available whenreportOpWriteConcernCountersInServerStatus parameter isset to true (false by default).

  • opWriteConcernCounters.insert

New in version 4.0.6.

A document that reports on the w: specifiedby insert operations to the mongod instance since itlast started:

Note

Only available whenreportOpWriteConcernCountersInServerStatus parameter isset to true (false by default).

  1. "insert" : {
  2. "wmajority" : NumberLong(<num>),
  3. "wnum" : {
  4. "<num>" : NumberLong(<num>),
  5. ...
  6. },
  7. "wtag" : {
  8. "<tag1>" : NumberLong(<num>),
  9. ...
  10. },
  11. "none" : NumberLong(<num>)
  12. },

Description"wmajority"Number of insert operations that specified w:"majority"."wnum"Number of insert operations that specified w:<num>. The counts are grouped by the specific<num>."wtag"Number of insert operations that specified w:<tag>. The counts are grouped by thespecific <tag>."none"Number of insert operations that did not specify w value.These operations use the default w value of 1.

The sum of the opWriteConcernCounters.insert equalsopcounters.insert.

  • opWriteConcernCounters.update

New in version 4.0.6.

A document that reports on the w: specifiedby update operations to the mongod instance since itlast started:

Note

Only available whenreportOpWriteConcernCountersInServerStatus parameter isset to true (false by default).

  1. "update" : {
  2. "wmajority" : NumberLong(<num>),
  3. "wnum" : {
  4. "<num>" : NumberLong(<num>),
  5. },
  6. "wtag" : {
  7. "<tag1>" : NumberLong(<num>),
  8. ...
  9. },
  10. "none" : NumberLong(<num>)
  11. },

Description"wmajority"Number of update operations that specified w:"majority"."wnum"Number of update operations that specified w:<num>. The counts are grouped by thespecific <num>."wtag"Number of update operations that specified w:<tag>. The counts are grouped by the specific<tag>."none"Number of update operations that did not specify w value.These operations use the default w value of 1.

The sum of the opWriteConcernCounters.update equalsopcounters.update.

  • opWriteConcernCounters.delete

New in version 4.0.6.

A document that reports on the w: specifiedby delete operations to the mongod instance since itlast started:

Note

Only available whenreportOpWriteConcernCountersInServerStatus parameter isset to true (false by default).

  1. "delete" : {
  2. "wmajority" : NumberLong(<num>)
  3. "wnum" : {
  4. "<num>" : NumberLong(<num>),
  5. ...
  6. },
  7. "wtag" : {
  8. "<tag1>" : NumberLong(<num>),
  9. ...
  10. },
  11. "none" : NumberLong(<num>)
  12. }

Description"wmajority"Number of delete operations that specified w:"majority"."wnum"Number of delete operations that specified w:<num>. The counts are grouped by the specific<num>."wtag"Number of delete operations that specified w:<tag>. The counts are grouped by thespecific <tag>."none"Number of delete operations that did not specify w value.These operations use the default w value of 1.

The sum of the opWriteConcernCounters.delete equalsopcounters.delete.

opcounters

Starting in MongoDB 4.2, the returned opcounters.* values aretype NumberLong. In previous versions, the values are of type NumberInt.

  1. "opcounters" : {
  2. "insert" : NumberLong(<num>), // Starting in MongoDB 4.2, type is NumberLong
  3. "query" : NumberLong(<num>), // Starting in MongoDB 4.2, type is NumberLong
  4. "update" : NumberLong(<num>), // Starting in MongoDB 4.2, type is NumberLong
  5. "delete" : NumberLong(<num>), // Starting in MongoDB 4.2, type is NumberLong
  6. "getmore" : NumberLong(<num>), // Starting in MongoDB 4.2, type is NumberLong
  7. "command" : NumberLong(<num>), // Starting in MongoDB 4.2, type is NumberLong
  8. },
  • opcounters
  • A document that reports on database operations by type since themongod instance last started.

These numbers will grow over time until next restart. Analyze thesevalues over time to track database utilization.

Note

The data in opcounters treats operationsthat affect multiple documents, such as bulk insert ormulti-update operations, as a single operation. Seemetrics.document for more granulardocument-level operation tracking.

Additionally, these values reflect received operations, andincrement even when operations are not successful.

  • opcounters.insert
  • The total number of insert operations received since themongod instance last started.

Starting in MongoDB 4.2, the returned opcounters.* values aretype NumberLong. In previous versions, the values are of type NumberInt.

  • opcounters.query
  • The total number of queries received since the mongodinstance last started.

Starting in MongoDB 4.2, the returned opcounters.* values aretype NumberLong. In previous versions, the values are of type NumberInt.

  • opcounters.update
  • The total number of update operations received since themongod instance last started.

Starting in MongoDB 4.2, the returned opcounters.* values aretype NumberLong. In previous versions, the values are of type NumberInt.

  • opcounters.delete
  • The total number of delete operations since the mongodinstance last started.

Starting in MongoDB 4.2, the returned opcounters.* values aretype NumberLong. In previous versions, the values are of type NumberInt.

  • opcounters.getmore
  • The total number of “getmore” operations since the mongodinstance last started. This counter can be high even if the querycount is low. Secondary nodes send getMore operations as part ofthe replication process.

Starting in MongoDB 4.2, the returned opcounters.* values aretype NumberLong. In previous versions, the values are of type NumberInt.

  • opcounters.command
  • The total number of commands issued to the database since themongod instance last started.

opcounters.command counts all commandsexcept the write commands:insert, update, and delete.

Starting in MongoDB 4.2, the returned opcounters.* values aretype NumberLong. In previous versions, the values are of type NumberInt.

opcountersRepl

Starting in MongoDB 4.2, the returned opcountersRepl.* values aretype NumberLong. In previous versions, the values are type NumberInt.

  1. "opcountersRepl" : {
  2. "insert" : NumberLong(<num>), // Starting in MongoDB 4.2, type is NumberLong
  3. "query" : NumberLong(<num>), // Starting in MongoDB 4.2, type is NumberLong
  4. "update" : NumberLong(<num>), // Starting in MongoDB 4.2, type is NumberLong
  5. "delete" : NumberLong(<num>), // Starting in MongoDB 4.2, type is NumberLong
  6. "getmore" : NumberLong(<num>), // Starting in MongoDB 4.2, type is NumberLong
  7. "command" : NumberLong(<num>), // Starting in MongoDB 4.2, type is NumberLong
  8. },
  • opcountersRepl
  • A document that reports on database replication operations by typesince the mongod instance last started.

These values only appear when the current host is a member of areplica set.

These values will differ from the opcounters valuesbecause of how MongoDB serializes operations during replication.See Replication for more information on replication.

These numbers will grow over time in response to database use untilnext restart. Analyze these values over time to track databaseutilization.

Starting in MongoDB 4.2, the returned opcountersRepl.* values aretype NumberLong. In previous versions, the values are type NumberInt.

  • opcountersRepl.insert
  • The total number of replicated insert operations since themongod instance last started.

Starting in MongoDB 4.2, the returned opcountersRepl.* values aretype NumberLong. In previous versions, the values are type NumberInt.

  • opcountersRepl.query
  • The total number of replicated queries since the mongodinstance last started.

Starting in MongoDB 4.2, the returned opcountersRepl.* values aretype NumberLong. In previous versions, the values are type NumberInt.

  • opcountersRepl.update
  • The total number of replicated update operations since themongod instance last started.

Starting in MongoDB 4.2, the returned opcountersRepl.* values aretype NumberLong. In previous versions, the values are type NumberInt.

  • opcountersRepl.delete
  • The total number of replicated delete operations since themongod instance last started.

Starting in MongoDB 4.2, the returned opcountersRepl.* values aretype NumberLong. In previous versions, the values are type NumberInt.

  • opcountersRepl.getmore
  • The total number of “getmore” operations since the mongodinstance last started. This counter can be high even if the querycount is low. Secondary nodes send getMore operations as part ofthe replication process.

Starting in MongoDB 4.2, the returned opcountersRepl.* values aretype NumberLong. In previous versions, the values are type NumberInt.

  • opcountersRepl.command
  • The total number of replicated commands issued to the database sincethe mongod instance last started.

Starting in MongoDB 4.2, the returned opcountersRepl.* values aretype NumberLong. In previous versions, the values are type NumberInt.

oplogTruncation

  1. "oplogTruncation" : {
  2. "totalTimeProcessingMicros" : <NumberLong>,
  3. "processingMethod" : <string>,
  4. "totalTimeTruncatingMicros" : <NumberLong>,
  5. "truncateCount" : <NumberLong>
  6. },
  • oplogTruncation

New in version 4.2.1: For WiredTiger storage engine

A document that reports on oplogtruncations.

The field only appears when the current instance is a member of areplica set and uses WiredTiger Storage Engine.

  • oplogTruncation.totalTimeProcessingMicros

New in version 4.2.1.

The total time taken, in microseconds, to scan or sample the oplogto determine the oplog truncation points.

See oplogTruncation.processingMethod

  • oplogTruncation.processingMethod

New in version 4.2.1.

The method used at start up to determine the oplog truncation points.The value can be either "sampling" or "scanning".

  • oplogTruncation.totalTimeTruncatingMicros

New in version 4.2.1.

The cumulative time spent, in microseconds, performing oplog truncations.

  • oplogTruncation.truncateCount

New in version 4.2.1.

The cumulative number of oplog truncations.

repl

  1. "repl" : {
  2. "hosts" : [
  3. <string>,
  4. <string>,
  5. <string>
  6. ],
  7. "setName" : <string>,
  8. "setVersion" : <num>,
  9. "ismaster" : <boolean>,
  10. "secondary" : <boolean>,
  11. "primary" : <hostname>,
  12. "me" : <hostname>,
  13. "electionId" : ObjectId(""),
  14. "rbid" : <num>,
  15. "replicationProgress" : [
  16. {
  17. "rid" : <ObjectId>,
  18. "optime" : { ts: <timestamp>, term: <num> },
  19. "host" : <hostname>,
  20. "memberId" : <num>
  21. },
  22. ...
  23. ]
  24. }
  • repl
  • A document that reports on the replica set configuration.repl only appear when the current host is a replicaset. See Replication for more information on replication.
  • repl.hosts
  • An array of the current replica set members’ hostname and portinformation ("host:port").
  • repl.setName
  • A string with the name of the current replica set. This valuereflects the —replSet command lineargument, or replSetName value in theconfiguration file.
  • repl.ismaster
  • A boolean that indicates whether the current node is theprimary of the replica set.
  • repl.secondary
  • A boolean that indicates whether the current node is asecondary member of the replica set.
  • repl.primary

New in version 3.0.

The hostname and port information ("host:port") of the currentprimary member of the replica set.

  • repl.me

New in version 3.0: The hostname and port information ("host:port") for the currentmember of the replica set.

  • repl.rbid

New in version 3.0.

Rollback identifier. Used to determine if a rollback hashappened for this mongod instance.

  • repl.replicationProgress

Changed in version 3.2: Previously named serverStatus.repl.slaves.

New in version 3.0.

An array with one document for each member of the replica set thatreports replication process to this member. Typically this is theprimary, or secondaries if using chained replication.

To include this output, you must pass the repl option to theserverStatus, as in the following:

  1. db.serverStatus({ "repl": 1 })
  2. db.runCommand({ "serverStatus": 1, "repl": 1 })

The content of the repl.replicationProgress sectiondepends on the source of each member’s replication. This sectionsupports internal operation and is for internal and diagnostic use only.

  • repl.replicationProgress[n].rid
  • An ObjectId used as an ID for the members of the replicaset. For internal use only.
  • repl.replicationProgress[n].optime
  • Information regarding the last operation from the oplog thatthe member applied, as reported from this member.
  • repl.replicationProgress[n].host
  • The name of the host in [hostname]:[port] format for the memberof the replica set.
  • repl.replicationProgress[n].memberID
  • The integer identifier for this member of the replica set.

security

  1. "security" : {
  2. "SSLServerSubjectName": <string>,
  3. "SSLServerHasCertificateAuthority": <boolean>,
  4. "SSLServerCertificateExpirationDate": <date>
  5. },
  • security

New in version 3.0.

A document that reports on security configuration and details;specifically, this section reports on themongod/mongos instance’s TLS/SSLcertificate.

The security information only appears formongod instances and mongos instanceswith support for TLS/SSL.

  • security.SSLServerSubjectName
  • The subject name associated with themongod/mongos instance’s TLS/SSLcertificate.

  • security.SSLServerHasCertificateAuthority

  • A boolean that is:

    • true when the mongod/mongosinstance’s TLS/SSL certificate is associated with a certificateauthority.
    • false when the TLS/SSL certificate is self-signed.
  • security.SSLServerCertificateExpirationDate
  • The expiration date and time of themongod/mongos instance’s TLS/SSLcertificate.

sharding

New in version 3.2: When run on mongos, the command returns shardinginformation.

Changed in version 3.6: Starting in MongoDB 3.6, shard members return sharding information.

  1. {
  2. "configsvrConnectionString" : "csRS/cfg1.example.net:27019,cfg2.example.net:27019,cfg2.example.net:27019",
  3. "lastSeenConfigServerOpTime" : {
  4. "ts" : Timestamp(1517462189, 1),
  5. "t" : NumberLong(1)
  6. },
  7. "maxChunkSizeInBytes" : NumberLong(67108864)
  8. }
  • sharding
  • A document with data regarding the sharded cluster. ThelastSeenConfigServerOpTime is present onlyfor a mongos or a shard member, not for a configserver.
  • sharding.configsvrConnectionString
  • The connection string for the config servers.
  • sharding.lastSeenConfigServerOpTime
  • The latest optime of the CSRS primary that the mongos orthe shard member has seen. The optime document includes:

  • sharding.maxChunkSizeInBytes

New in version 3.6.

The maximum size limit for a chunk. Ifthe chunk size has been updated recently on the config server, themaxChunkSizeInBytes may not reflect themost recent value.

shardingStatistics

New in version 4.0.

  • Shard
  • mongos

When run on a member of a shard:

  1. "shardingStatistics" : {
  2. "countStaleConfigErrors" : NumberLong(<num>),
  3. "countDonorMoveChunkStarted" : NumberLong(<num>),
  4. "totalDonorChunkCloneTimeMillis" : NumberLong(<num>),
  5. "totalCriticalSectionCommitTimeMillis" : NumberLong(<num>),
  6. "totalCriticalSectionTimeMillis" : NumberLong(<num>),
  7. "countDocsClonedOnRecipient" : NumberLong(<num>),
  8. "countDocsClonedOnDonor" : NumberLong(<num>),
  9. "countRecipientMoveChunkStarted" : NumberLong(<num>),
  10. "countDocsDeletedOnDonor" : NumberLong(<num>),
  11. "countDonorMoveChunkLockTimeout" : NumberLong(<num>),
  12. "catalogCache" : {
  13. "numDatabaseEntries" : NumberLong(<num>),
  14. "numCollectionEntries" : NumberLong(<num>),
  15. "countStaleConfigErrors" : NumberLong(<num>),
  16. "totalRefreshWaitTimeMicros" : NumberLong(<num>),
  17. "numActiveIncrementalRefreshes" : NumberLong(<num>),
  18. "countIncrementalRefreshesStarted" : NumberLong(<num>),
  19. "numActiveFullRefreshes" : NumberLong(<num>),
  20. "countFullRefreshesStarted" : NumberLong(<num>),
  21. "countFailedRefreshes" : NumberLong(<num>)
  22. }
  23. },

When run on a mongos:

  1. "shardingStatistics" : {
  2. "catalogCache" : {
  3. "numDatabaseEntries" : NumberLong(<num>),
  4. "numCollectionEntries" : NumberLong(<num>),
  5. "countStaleConfigErrors" : NumberLong(<num>),
  6. "totalRefreshWaitTimeMicros" : NumberLong(<num>),
  7. "numActiveIncrementalRefreshes" : NumberLong(<num>),
  8. "countIncrementalRefreshesStarted" : NumberLong(<num>),
  9. "numActiveFullRefreshes" : NumberLong(<num>),
  10. "countFullRefreshesStarted" : NumberLong(<num>),
  11. "countFailedRefreshes" : NumberLong(<num>)
  12. }
  13. },
  • shardingStatistics
  • A document which contains metrics on metadata refresh on shardedclusters.
  • shardingStatistics.countStaleConfigErrors
  • The total number of times that threads hit stale config exception.Since a stale config exception triggers a refresh of the metadata,this number is roughly proportional to the number of metadatarefreshes.

Only present when run on a shard.

  • shardingStatistics.countDonorMoveChunkStarted
  • The total number of times that the moveChunk commandhas started on the shard, of which this node is a member, as part ofa chunk migration process. Thisincreasing number does not consider whether the chunk migrationssucceed or not.

Only present when run on a shard.

  • shardingStatistics.totalDonorChunkCloneTimeMillis
  • The cumulative time, in milliseconds, taken by the clone phaseof the chunk migrations from thisshard, of which this node is a member. Specifically, for eachmigration from this shard, the tracked time starts with themoveChunk command and ends before the destination shardenters a catch-up phase to apply changes that occurred during thechunk migrations.

Only present when run on a shard.

  • shardingStatistics.totalCriticalSectionCommitTimeMillis
  • The cumulative time, in milliseconds, taken by the updatemetadata phase of the chunk migrationsfrom this shard, of which this node is a member. During the updatemetadata phase, all operations on the collection are blocked.

Only present when run on a shard.

To calculate the duration of the catch-up phase, subtracttotalCriticalSectionCommitTimeMillis fromtotalCriticalSectionTimeMillis

  1. totalCriticalSectionTimeMillis - totalCriticalSectionCommitTimeMillis

Only present when run on a shard.

  • shardingStatistics.countDocsClonedOnRecipient
  • Cumulative, always-increasing count of documents that have beencloned on this member where it acted as the primary of the recipientshard.

Only present when run on a shard.

New in version 4.2.

  • shardingStatistics.countDocsClonedOnDonor
  • Cumulative, always-increasing count of documents that haves beencloned on this member where it acted as the primary of the donorshard.

Only present when run on a shard.

New in version 4.2.

  • shardingStatistics.countRecipientMoveChunkStarted
  • Cumulative, always-increasing count of chunks this member, acting asthe primary of the recipient shard, has started to receive (whetherthe move has succeeded or not.

Only present when run on a shard.

New in version 4.2.

  • shardingStatistics.countDocsDeletedOnDonor
  • Cumulative, always-increasing count of documents that have beendeleted on this member during chunk migration where the member actedas the primary of the donor shard.

Only present when run on a shard.

New in version 4.2.

  • shardingStatistics.countDonorMoveChunkLockTimeout
  • Cumulative, always-increasing count of chunk migrations that wereaborted due to lock acquisition timeouts, where the member acted asthe primary of the donor shard.

Only present when run on a shard.

New in version 4.2.

  • shardingStatistics.catalogCache
  • A document with statistics about the cluster’s routing information cache.
  • shardingStatistics.catalogCache.numDatabaseEntries
  • The total number of database entries that are currently in thecatalog cache.
  • shardingStatistics.catalogCache.numCollectionEntries
  • The total number of collection entries (across all databases) thatare currently in the catalog cache.
  • shardingStatistics.catalogCache.countStaleConfigErrors
  • The total number of times that threads hit stale config exception. Astale config exception triggers a refresh of the metadata.
  • shardingStatistics.catalogCache.totalRefreshWaitTimeMicros
  • The cumulative time, in microseconds, that threads had to wait for arefresh of the metadata.
  • shardingStatistics.catalogCache.numActiveIncrementalRefreshes
  • The number of incremental catalog cache refreshes that are currentlywaiting to complete.
  • shardingStatistics.countIncrementalRefreshesStarted
  • The cumulative number of incremental refreshes that have started.
  • shardingStatistics.catalogCache.numActiveFullRefreshes
  • The number of full catalog cache refreshes that are currentlywaiting to complete.
  • shardingStatistics.catalogCache.countFullRefreshesStarted
  • The cumulative number of full refreshes that have started.
  • shardingStatistics.catalogCache.countFailedRefreshes
  • The cumulative number of full or incremental refreshes that have failed.

storageEngine

New in version 3.0.

  1. "storageEngine" : {
  2. "name" : <string>,
  3. "supportsCommittedReads" : <boolean>,
  4. "persistent" : <boolean>
  5. },
  • storageEngine
  • A document with data about the current storage engine.
  • storageEngine.name
  • The name of the current storage engine.
  • storageEngine.supportsCommittedReads

New in version 3.2.

A boolean that indicates whether the storage engine supports"majority"read concern.

  • storageEngine.persistent

New in version 3.2.6.

A boolean that indicates whether the storage engine does or does not persist data to disk.

transactions

  • mongod
  • mongos

New in version 3.6.3.

  1. "transactions" : {
  2. "retriedCommandsCount" : <NumberLong>,
  3. "retriedStatementsCount" : <NumberLong>,
  4. "transactionsCollectionWriteCount" : <NumberLong>,
  5. "currentActive" : <NumberLong>,
  6. "currentInactive" : <NumberLong>,
  7. "currentOpen" : <NumberLong>,
  8. "totalAborted" : <NumberLong>,
  9. "totalCommitted" : <NumberLong>,
  10. "totalStarted" : <NumberLong>,
  11. "totalPrepared" : <NumberLong>,
  12. "totalPreparedThenCommitted" : <NumberLong>,
  13. "totalPreparedThenAborted" : <NumberLong>,
  14. "currentPrepared" : <NumberLong>
  15. },

New in version 4.2.

  1. "transactions" : {
  2. "totalStarted" : <NumberLong>,
  3. "totalCommitted" : <NumberLong>,
  4. "totalAborted" : <NumberLong>,
  5. "abortCause" : {
  6. <String1> : <NumberLong>,
  7. <String2>" : <NumberLong>,
  8. ...
  9. },
  10. "totalContactedParticipants" : <NumberLong>,
  11. "totalParticipantsAtCommit" : <NumberLong>,
  12. "totalRequestsTargeted" : <NumberLong>,
  13. "commitTypes" : {
  14. "noShards" : {
  15. "initiated" : <NumberLong>,
  16. "successful" : <NumberLong>,
  17. "successfulDurationMicros" : <NumberLong>,
  18. },
  19. "singleShard" : {
  20. "initiated" : <NumberLong>,
  21. "successful" : <NumberLong>,
  22. "successfulDurationMicros" : <NumberLong>,
  23. },
  24. "singleWriteShard" : {
  25. "initiated" : <NumberLong>,
  26. "successful" : <NumberLong>,
  27. "successfulDurationMicros" : <NumberLong>,
  28. },
  29. "readOnly" : {
  30. "initiated" : <NumberLong>,
  31. "successful" : <NumberLong>,
  32. "successfulDurationMicros" : <NumberLong>,
  33. },
  34. "twoPhaseCommit" : {
  35. "initiated" : <NumberLong>,
  36. "successful" : <NumberLong>,
  37. "successfulDurationMicros" :<NumberLong>,
  38. },
  39. "recoverWithToken" : {
  40. "initiated" : <NumberLong>,
  41. "successful" : <NumberLong>,
  42. "successfulDurationMicros" : <NumberLong>,
  43. }
  44. }
  45. },
  • transactions
  • Available on mongod in 3.6.3+ and on mongos in 4.2+.

When run on a mongod, a document with data about theretryable writes andtransactions.

When run on a mongos, a document with data about thetransactions run on the instance.

  • transactions.retriedCommandsCount
  • Available on mongod only.

The total number of retry attempts that have been received after thecorresponding retryable write command has already been committed.That is, a retryable write is attempted even though the write haspreviously succeeded and has an associated record for thetransaction and session in the config.transactionscollection, such as when the initial write response to the client islost.

Note

MongoDB does not re-execute the committed writes.

The total is across all sessions.

The total does not include any retryable writes that may happeninternally as part of a chunk migration.

New in version 3.6.3.

  • transactions.retriedStatementsCount
  • Available on mongod only.

The total number of write statements associated with the retriedcommands in transactions.retriedCommandsCount.

Note

MongoDB does not re-execute the committed writes.

The total does not include any retryable writes that may happeninternally as part of a chunk migration.

New in version 3.6.3.

  • transactions.transactionsCollectionWriteCount
  • Available on mongod only.

The total number of writes to the config.transactionscollection, triggered when a new retryable write statement iscommitted.

For update and delete commands, since only single documentoperations are retryable, there is one write per statement.

For insert operations, there is one write per batch of documentsinserted, except when a failure leads to each document beinginserted separately.

The total includes writes to a server’s config.transactionscollection that occur as part of a migration.

New in version 3.6.3.

  • transactions.currentActive
  • Available on mongod only.

The total number of open transactions currently executing a command.

New in version 4.0.2.

  • transactions.currentInactive
  • Available on mongod only.

The total number of open transactions that are not currentlyexecuting a command.

New in version 4.0.2.

  • transactions.currentOpen
  • Available on mongod only.

The total number of open transactions. A transaction is opened whenthe first command is run as a part of that transaction, and staysopen until the transaction either commits or aborts.

New in version 4.0.2.

  • transactions.totalAborted
  • Available on mongod in 4.0.2+ and mongos in 4.2+.

For the mongod, the total number of transactionsaborted on this instance since its last startup.

For the mongos, the total number of transactionsaborted through this instance since its last startup.

  • transactions.totalCommitted
  • Available on mongod in 4.0.2+ and mongos in 4.2+.

For the mongod, the total number of transactionscommitted on the instance since its last startup.

For the mongos,the total number of transactionscommitted through this instance since its last startup.

  • transactions.totalStarted
  • Available on mongod in 4.0.2+ and mongos in 4.2+.

For the mongod, the total number of transactionsstarted on this instance since its last startup.

For the mongos, the total number of transactionsstarted on this instance since its last startup.

  • transactions.abortCause
  • Available on mongos only.

Breakdown of the transactions.totalAborted by cause.If a client issues an explicit abortTransaction, the cause islisted as abort.

For example:

  1. "totalAborted" : NumberLong(5),
  2. "abortCause" : {
  3. "abort" : NumberLong(1),
  4. "DuplicateKey" : NumberLong(1),
  5. "StaleConfig" : NumberLong(3),
  6. "SnapshotTooOld" : NumberLong(1)
  7. },

New in version 4.2.

  • transactions.totalContactedParticipants
  • Available on mongos only.

The total number of shards contacted for all transactions startedthrough this mongos since its last startup.

The number of shards contacted during the transaction processes caninclude those shards that may not be included as part of the commit.

New in version 4.2.

  • transactions.totalParticipantsAtCommit
  • Available on mongos only.

Total number of shards involved in the commit for all transactionsstarted through this mongos since its last startup.

New in version 4.2.

  • transactions.totalRequestsTargeted
  • Available on mongos only.

Total number of network requests targeted by themongos as part of its transactions.

New in version 4.2.

  • transactions.commitTypes
  • Available on mongos only.

Breakdown of the commits by types. For example:

  1. "noShards" : {
  2. "initiated" : NumberLong(0),
  3. "successful" : NumberLong(0),
  4. "successfulDurationMicros" : NumberLong(0)
  5. },
  6. "singleShard" : {
  7. "initiated" : NumberLong(5),
  8. "successful" : NumberLong(5),
  9. "successfulDurationMicros" : NumberLong(203118)
  10. },
  11. "singleWriteShard" : {
  12. "initiated" : NumberLong(0),
  13. "successful" : NumberLong(0),
  14. "successfulDurationMicros" : NumberLong(0)
  15. },
  16. "readOnly" : {
  17. "initiated" : NumberLong(0),
  18. "successful" : NumberLong(0),
  19. "successfulDurationMicros" : NumberLong(0)
  20. },
  21. "twoPhaseCommit" : {
  22. "initiated" : NumberLong(1),
  23. "successful" : NumberLong(1),
  24. "successfulDurationMicros" : NumberLong(179616)
  25. },
  26. "recoverWithToken" : {
  27. "initiated" : NumberLong(0),
  28. "successful" : NumberLong(0),
  29. "successfulDurationMicros" : NumberLong(0)
  30. }

The types of commit are:

TypeDescriptionnoShardsCommits of transactions that did not contact any shards.singleShardCommits of transactions that affected a single shard.singleWriteShardCommits of transactions that contacted multiple shards butwhose write operations only affected a single shard.readOnlyCommits of transactions that only involved read operations.twoPhaseCommitCommits of transactions that included writes to multipleshardsrecoverWithTokenCommits that recovered the outcome of transactions fromanother instance or after this instance was restarted.

For each commit type, the command returns the following metrics:

MetricsDescriptioninitiatedTotal number of times that commits of this type wereinitiated.successfulTotal number of times that commits of this type succeeded.successfulDurationMicrosTotal time, in microseconds, taken by successful commits ofthis type.

New in version 4.2.

  • transactions.totalPrepared
  • Available on mongod only.

The total number of transactions in prepared state on this serversince the mongod process’s last startup.

New in version 4.2.

  • transactions.totalPreparedThenCommitted
  • Available on mongod only.

The total number of transactions that were prepared and committed onthis server since the mongod process’s laststartup.

New in version 4.2.

  • transactions.totalPreparedThenAborted
  • Available on mongod only.

The total number of transactions that were prepared and aborted onthis server since the mongod process’s laststartup.

New in version 4.2.

  • transactions.currentPrepared
  • Available on mongod only.

The current number of transactions in prepared state on this server.

New in version 4.2.

transportSecurity

New in version 4.0.2: (Also available in 3.6.7+ and 3.4.17+)

  1. "transportSecurity" : {
  2. "1.0" : <NumberLong>,
  3. "1.1" : <NumberLong>,
  4. "1.2" : <NumberLong>,
  5. "1.3" : <NumberLong>,
  6. "unknown" :<NumberLong>
  7. },
  • transportSecurity.<version>

New in version 4.0.2: (Also available in 3.6.7+ and 3.4.17+)

The cumulative number of TLS connections that have beenmade to this mongod or mongosinstance. The value is reset upon restart.

wiredTiger

wiredTiger information only appears if using the WiredTiger storage engine. Some of the statistics, such aswiredTiger.LSM, roll up for the server.

  1. "wiredTiger" : {
  2. "uri" : "statistics:",
  3. "LSM" : {
  4. "sleep for LSM checkpoint throttle" : <num>,
  5. "sleep for LSM merge throttle" : <num>,
  6. "rows merged in an LSM tree" : <num>,
  7. "application work units currently queued" : <num>,
  8. "merge work units currently queued" : <num>,
  9. "tree queue hit maximum" : <num>,
  10. "switch work units currently queued" : <num>,
  11. "tree maintenance operations scheduled" : <num>,
  12. "tree maintenance operations discarded" : <num>,
  13. "tree maintenance operations executed" : <num>
  14. },
  15. "async" : {
  16. "number of allocation state races" : <num>,
  17. "number of operation slots viewed for allocation" : <num>,
  18. "current work queue length" : <num>,
  19. "number of flush calls" : <num>,
  20. "number of times operation allocation failed" : <num>,
  21. "maximum work queue length" : <num>,
  22. "number of times worker found no work" : <num>,
  23. "total allocations" : <num>,
  24. "total compact calls" : <num>,
  25. "total insert calls" : <num>,
  26. "total remove calls" : <num>,
  27. "total search calls" : <num>,
  28. "total update calls" : <num>
  29. },
  30. "block-manager" : {
  31. "mapped bytes read" : <num>,
  32. "bytes read" : <num>,
  33. "bytes written" : <num>,
  34. "mapped blocks read" : <num>,
  35. "blocks pre-loaded" : <num>,
  36. "blocks read" : <num>,
  37. "blocks written" : <num>
  38. },
  39. "cache" : {
  40. "tracked dirty bytes in the cache" : <num>,
  41. "tracked bytes belonging to internal pages in the cache" : <num>,
  42. "bytes currently in the cache" : <num>,
  43. "tracked bytes belonging to leaf pages in the cache" : <num>,
  44. "maximum bytes configured" : <num>,
  45. "tracked bytes belonging to overflow pages in the cache" : <num>,
  46. "bytes read into cache" : <num>,
  47. "bytes written from cache" : <num>,
  48. "pages evicted by application threads" : <num>,
  49. "checkpoint blocked page eviction" : <num>,
  50. "unmodified pages evicted" : <num>,
  51. "page split during eviction deepened the tree" : <num>,
  52. "modified pages evicted" : <num>,
  53. "pages selected for eviction unable to be evicted" : <num>,
  54. "pages evicted because they exceeded the in-memory maximum" : <num>,
  55. "pages evicted because they had chains of deleted items" : <num>,
  56. "failed eviction of pages that exceeded the in-memory maximum" : <num>,
  57. "hazard pointer blocked page eviction" : <num>,
  58. "internal pages evicted" : <num>,
  59. "maximum page size at eviction" : <num>,
  60. "eviction server candidate queue empty when topping up" : <num>,
  61. "eviction server candidate queue not empty when topping up" : <num>,
  62. "eviction server evicting pages" : <num>,
  63. "eviction server populating queue, but not evicting pages" : <num>,
  64. "eviction server unable to reach eviction goal" : <num>,
  65. "internal pages split during eviction" : <num>,
  66. "leaf pages split during eviction" : <num>,
  67. "pages walked for eviction" : <num>,
  68. "eviction worker thread evicting pages" : <num>,
  69. "in-memory page splits" : <num>,
  70. "in-memory page passed criteria to be split" : <num>,
  71. "lookaside table insert calls" : <num>,
  72. "lookaside table remove calls" : <num>,
  73. "percentage overhead" : <num>,
  74. "tracked dirty pages in the cache" : <num>,
  75. "pages currently held in the cache" : <num>,
  76. "pages read into cache" : <num>,
  77. "pages read into cache requiring lookaside entries" : <num>,
  78. "pages written from cache" : <num>,
  79. "page written requiring lookaside records" : <num>,
  80. "pages written requiring in-memory restoration" : <num>
  81. },
  82. "connection" : {
  83. "pthread mutex condition wait calls" : <num>,
  84. "files currently open" : <num>,
  85. "memory allocations" : <num>,
  86. "memory frees" : <num>,
  87. "memory re-allocations" : <num>,
  88. "total read I/Os" : <num>,
  89. "pthread mutex shared lock read-lock calls" : <num>,
  90. "pthread mutex shared lock write-lock calls" : <num>,
  91. "total write I/Os" : <num>
  92. },
  93. "cursor" : {
  94. "cursor create calls" : <num>,
  95. "cursor insert calls" : <num>,
  96. "cursor next calls" : <num>,
  97. "cursor prev calls" : <num>,
  98. "cursor remove calls" : <num>,
  99. "cursor reset calls" : <num>,
  100. "cursor restarted searches" : <num>,
  101. "cursor search calls" : <num>,
  102. "cursor search near calls" : <num>,
  103. "truncate calls" : <num>,
  104. "cursor update calls" : <num>
  105. },
  106. "data-handle" : {
  107. "connection data handles currently active" : <num>,
  108. "session dhandles swept" : <num>,
  109. "session sweep attempts" : <num>,
  110. "connection sweep dhandles closed" : <num>,
  111. "connection sweep candidate became referenced" : <num>,
  112. "connection sweep dhandles removed from hash list" : <num>,
  113. "connection sweep time-of-death sets" : <num>,
  114. "connection sweeps" : <num>
  115. },
  116. "log" : {
  117. "total log buffer size" : <num>,
  118. "log bytes of payload data" : <num>,
  119. "log bytes written" : <num>,
  120. "yields waiting for previous log file close" : <num>,
  121. "total size of compressed records" : <num>,
  122. "total in-memory size of compressed records" : <num>,
  123. "log records too small to compress" : <num>,
  124. "log records not compressed" : <num>,
  125. "log records compressed" : <num>,
  126. "log flush operations" : <num>,
  127. "maximum log file size" : <num>,
  128. "pre-allocated log files prepared" : <num>,
  129. "number of pre-allocated log files to create" : <num>,
  130. "pre-allocated log files not ready and missed" : <num>,
  131. "pre-allocated log files used" : <num>,
  132. "log release advances write LSN" : <num>,
  133. "records processed by log scan" : <num>,
  134. "log scan records requiring two reads" : <num>,
  135. "log scan operations" : <num>,
  136. "consolidated slot closures" : <num>,
  137. "written slots coalesced" : <num>,
  138. "logging bytes consolidated" : <num>,
  139. "consolidated slot joins" : <num>,
  140. "consolidated slot join races" : <num>,
  141. "busy returns attempting to switch slots" : <num>,
  142. "consolidated slot join transitions" : <num>,
  143. "consolidated slot unbuffered writes" : <num>,
  144. "log sync operations" : <num>,
  145. "log sync_dir operations" : <num>,
  146. "log server thread advances write LSN" : <num>,
  147. "log write operations" : <num>,
  148. "log files manually zero-filled" : <num>
  149. },
  150. "reconciliation" : {
  151. "pages deleted" : <num>,
  152. "fast-path pages deleted" : <num>,
  153. "page reconciliation calls" : <num>,
  154. "page reconciliation calls for eviction" : <num>,
  155. "split bytes currently awaiting free" : <num>,
  156. "split objects currently awaiting free" : <num>
  157. },
  158. "session" : {
  159. "open cursor count" : <num>,
  160. "open session count" : <num>
  161. },
  162. "thread-yield" : {
  163. "page acquire busy blocked" : <num>,
  164. "page acquire eviction blocked" : <num>,
  165. "page acquire locked blocked" : <num>,
  166. "page acquire read blocked" : <num>,
  167. "page acquire time sleeping (usecs)" : <num>
  168. },
  169. "transaction" : {
  170. "transaction begins" : <num>,
  171. "transaction checkpoints" : <num>,
  172. "transaction checkpoint generation" : <num>,
  173. "transaction checkpoint currently running" : <num>,
  174. "transaction checkpoint max time (msecs)" : <num>,
  175. "transaction checkpoint min time (msecs)" : <num>,
  176. "transaction checkpoint most recent time (msecs)" : <num>,
  177. "transaction checkpoint total time (msecs)" : <num>,
  178. "transactions committed" : <num>,
  179. "transaction failures due to cache overflow" : <num>,
  180. "transaction range of IDs currently pinned by a checkpoint" : <num>,
  181. "transaction range of IDs currently pinned" : <num>,
  182. "transaction range of IDs currently pinned by named snapshots" : <num>,
  183. "transactions rolled back" : <num>,
  184. "number of named snapshots created" : <num>,
  185. "number of named snapshots dropped" : <num>,
  186. "transaction sync calls" : <num>
  187. },
  188. "concurrentTransactions" : {
  189. "write" : {
  190. "out" : <num>,
  191. "available" : <num>,
  192. "totalTickets" : <num>
  193. },
  194. "read" : {
  195. "out" : <num>,
  196. "available" : <num>,
  197. "totalTickets" : <num>
  198. }
  199. }
  200. },
  • wiredTiger.uri

New in version 3.0.

A string. For internal use by MongoDB.

  • wiredTiger.LSM

New in version 3.0.

A document that returns statistics on the LSM (Log-Structured Merge)tree. The values reflects the statistics for all LSM trees used inthis server.

  • wiredTiger.async

New in version 3.0.

A document that returns statistics related to the asynchronousoperations API. This is unused by MongoDB.

  • wiredTiger.block-manager

New in version 3.0.

A document that returns statistics on the block manager operations.

  • wiredTiger.cache

New in version 3.0: A document that returns statistics on the cache and page evictionsfrom the cache.

The following describes some of the keywiredTiger.cache statistics:

  • wiredTiger.cache.maximum bytes configured
  • Maximum cache size.

  • wiredTiger.cache.bytes currently in the cache

  • Size in byte of the data currently in cache. This value shouldnot be greater than the maximum bytes configured value.

  • wiredTiger.cache.unmodified pages evicted

  • Main statistics for page eviction.

  • wiredTiger.cache.tracked dirty bytes in the cache

  • Size in bytes of the dirty data in the cache. This value shouldbe less than the bytes currently in the cache value.

  • wiredTiger.cache.pages read into cache

  • Number of pages read into the cache.wiredTiger.cache.pages read into cache withthe wiredTiger.cache.pages written fromcache can provide an overview of the I/O activity.

  • wiredTiger.cache.pages written from cache

  • Number of pages written from the cache.wiredTiger.cache.pages written from cachewith the wiredTiger.cache.pages read intocache can provide an overview of the I/O activity.

To adjust the size of the WiredTiger internal cache, seestorage.wiredTiger.engineConfig.cacheSizeGB and—wiredTigerCacheSizeGB. Avoid increasing the WiredTigerinternal cache size above its default value.

  • wiredTiger.connection

New in version 3.0.

A document that returns statistics related to WiredTiger connections.

  • wiredTiger.cursor

New in version 3.0.

A document that returns statistics on WiredTiger cursor.

  • wiredTiger.data-handle

New in version 3.0.

A document that returns statistics on the data handles and sweeps.

  • wiredTiger.log

New in version 3.0.

A document that returns statistics on WiredTiger’s write ahead log(i.e. the journal).

See also

Journaling and the WiredTiger Storage Engine

  • wiredTiger.reconciliation

New in version 3.0.

A document that returns statistics on the reconciliation process.

  • wiredTiger.session

New in version 3.0.

A document that returns the open cursor count and open session countfor the session.

  • wiredTiger.thread-yield

New in version 3.0.

A document that returns statistics on yields during pageacquisitions.

  • wiredTiger.transaction

New in version 3.0.

A document that returns statistics on transaction checkpoints andoperations.

  • wiredTiger.transaction.transaction checkpoint most recent time
  • Amount of time, in milliseconds, to create the most recentcheckpoint. An increase in this value under stead write load mayindicate saturation on the I/O subsystem.
  • wiredTiger.concurrentTransactions

New in version 3.0.

A document that returns information on the number of concurrent ofread and write transactions allowed into the WiredTiger storageengine. These settings are MongoDB-specific.

To change the settings for concurrentreads and write transactions, seewiredTigerConcurrentReadTransactions andwiredTigerConcurrentWriteTransactions.

writeBacksQueued

  1. "writeBacksQueued" : <boolean>,
  • writeBacksQueued
  • A boolean that indicates whether there are operations from amongos instance queued for retrying. Typically, thisvalue is false. See also writeBacks.

mem

  1. "mem" : {
  2. "bits" : <int>,
  3. "resident" : <int>,
  4. "virtual" : <int>,
  5. "supported" : <boolean>,
  6. "mapped" : <int>,
  7. "mappedWithJournal" : <int>
  8. },
  • mem
  • A document that reports on the system architecture of themongod and current memory use.
  • mem.bits
  • A number, either 64 or 32, that indicates whether theMongoDB instance is compiled for 64-bit or 32-bit architecture.
  • mem.resident
  • The value of mem.resident is roughly equivalent tothe amount of RAM, in mebibyte (MiB), currently used by the databaseprocess. During normal use, this value tends to grow. In dedicateddatabase servers, this number tends to approach the total amount ofsystem memory.
  • mem.virtual
  • mem.virtual displays the quantity, in mebibyte(MiB), of virtual memory used by the mongod process.
  • mem.supported
  • A boolean that indicates whether the underlying system supportsextended memory information. If this value is false and the systemdoes not support extended memory information, then othermem values may not be accessible to the databaseserver.

The mem.note field contains the text: "not all meminfo support on this platform".

metrics

  1. "metrics" : {
  2. "commands": {
  3. "<command>": {
  4. "failed": <num>,
  5. "total": <num>
  6. }
  7. },
  8. "cursor" : {
  9. "timedOut" : NumberLong(<num>),
  10. "open" : {
  11. "noTimeout" : NumberLong(<num>),
  12. "pinned" : NumberLong(<num>),
  13. "multiTarget" : NumberLong(<num>),
  14. "singleTarget" : NumberLong(<num>),
  15. "total" : NumberLong(<num>),
  16. }
  17. },
  18. "document" : {
  19. "deleted" : NumberLong(<num>),
  20. "inserted" : NumberLong(<num>),
  21. "returned" : NumberLong(<num>),
  22. "updated" : NumberLong(<num>)
  23. },
  24. "getLastError" : {
  25. "wtime" : {
  26. "num" : <num>,
  27. "totalMillis" : <num>
  28. },
  29. "wtimeouts" : NumberLong(<num>)
  30. },
  31. "operation" : {
  32. "scanAndOrder" : NumberLong(<num>),
  33. "writeConflicts" : NumberLong(<num>)
  34. },
  35. "queryExecutor": {
  36. "scanned" : NumberLong(<num>),
  37. "scannedObjects" : NumberLong(<num>)
  38. },
  39. "record" : {
  40. "moves" : NumberLong(<num>)
  41. },
  42. "repl" : {
  43. "executor" : {
  44. "pool" : {
  45. "inProgressCount" : <num>
  46. },
  47. "queues" : {
  48. "networkInProgress" : <num>,
  49. "sleepers" : <num>
  50. },
  51. "unsignaledEvents" : <num>,
  52. "shuttingDown" : <boolean>,
  53. "networkInterface" : <string>
  54. },
  55. "apply" : {
  56. "attemptsToBecomeSecondary" : <NumberLong>,
  57. "batches" : {
  58. "num" : <num>,
  59. "totalMillis" : <num>
  60. },
  61. "ops" : <NumberLong>
  62. },
  63. "buffer" : {
  64. "count" : <NumberLong>,
  65. "maxSizeBytes" : <NumberLong>,
  66. "sizeBytes" : <NumberLong>
  67. },
  68. "initialSync" : {
  69. "completed" : <NumberLong>,
  70. "failedAttempts" : <NumberLong>,
  71. "failures" : <NumberLong>,
  72. },
  73. "network" : {
  74. "bytes" : <NumberLong>,
  75. "getmores" : {
  76. "num" : <num>,
  77. "totalMillis" : <num>
  78. },
  79. "notMasterLegacyUnacknowledgedWrites" : <NumberLong>,
  80. "notMasterUnacknowledgedWrites" : <NumberLong>,
  81. "ops" : <NumberLong>,
  82. "readersCreated" : <NumberLong>
  83. },
  84. "stepDown" : {
  85. "userOperationsKilled" : <NumberLong>,
  86. "userOperationsRunning" : <NumberLong>
  87. }
  88. },
  89. "storage" : {
  90. "freelist" : {
  91. "search" : {
  92. "bucketExhausted" : <num>,
  93. "requests" : <num>,
  94. "scanned" : <num>
  95. }
  96. }
  97. },
  98. "ttl" : {
  99. "deletedDocuments" : NumberLong(<num>),
  100. "passes" : NumberLong(<num>)
  101. }
  102. },
  • metrics
  • A document that returns various statistics that reflect the currentuse and state of a running mongod instance.
  • metrics.commands

New in version 3.0.

A document that reports on the use of database commands. The fieldsin metrics.commands are the names of databasecommands. For each command, theserverStatus reports the total number of executions andthe number of failed executions.

Starting in MongoDB 4.0.13 and 4.2.1,metrics.commands includereplSetStepDownWithForce (i.e. the replSetStepDowncommand with force: true) as well as the overallreplSetStepDown. In earlier versions, the commandreported only overall replSetStepDown metrics.

  • metrics.commands.<command>.failed
  • The number of times <command> failed on thismongod.
  • metrics.commands.<command>.total
  • The number of times <command> executed on thismongod.
  • metrics.document
  • A document that reflects document access and modification patterns.Compare these values to the data in the opcountersdocument, which track total number of operations.
  • metrics.document.deleted
  • The total number of documents deleted.
  • metrics.document.inserted
  • The total number of documents inserted.
  • metrics.document.returned
  • The total number of documents returned by queries.
  • metrics.document.updated
  • The total number of documents updated.
  • metrics.executor

New in version 3.2.

A document that reports on various statistics for the replicationexecutor.

  • metrics.getLastError
  • A document that reports on getLastError use.
  • metrics.getLastError.wtime
  • A document that reports getLastError operation countswith a w argument greater than 1.
  • metrics.getLastError.wtime.num
  • The total number of getLastError operations with aspecified write concern (i.e. w) that wait for one or moremembers of a replica set to acknowledge the write operation (i.e. aw value greater than 1.)
  • metrics.getLastError.wtime.totalMillis
  • The total amount of time in milliseconds that the mongodhas spent performing getLastError operations with writeconcern (i.e. w) that wait for one or more members of a replicaset to acknowledge the write operation (i.e. a w value greaterthan 1.)
  • metrics.getLastError.wtimeouts
  • The number of times that write concern operations have timedout as a result of the wtimeout threshold togetLastError.
  • metrics.operation
  • A document that holds counters for several types of update and queryoperations that MongoDB handles using special operation types.
  • metrics.operation.scanAndOrder
  • The total number of queries that return sorted numbers that cannotperform the sort operation using an index.
  • metrics.operation.writeConflicts
  • The total number of queries that encountered write conflicts.
  • metrics.queryExecutor
  • A document that reports data from the query execution system.
  • metrics.queryExecutor.scanned
  • The total number of index items scanned during queries andquery-plan evaluation. This counter is the same astotalKeysExamined in the output ofexplain().
  • metrics.queryExecutor.scannedObjects
  • The total number of documents scanned during queries and query-planevaluation. This counter is the same astotalDocsExamined in the output ofexplain().
  • metrics.record
  • A document that reports on data related to record allocation in theon-disk memory files.
  • metrics.repl
  • A document that reports metrics related to the replication process.metrics.repl document appears on allmongod instances, even those that aren’t members ofreplica sets.
  • metrics.repl.apply
  • A document that reports on the application of operations from thereplication oplog.
  • metrics.repl.apply.batchSize

New in version 4.0.6: (Also available in 3.6.11+)

The total number of oplog operations applied. Themetrics.repl.apply.batchSize is incremented with thenumber of operations in a batch at the batch boundaries instead ofbeing incremented by one after each operation.

For finer granularity, see metrics.repl.apply.ops.

  • metrics.repl.apply.batches.num
  • The total number of batches applied across all databases.
  • metrics.repl.apply.batches.totalMillis
  • The total amount of time in milliseconds the mongod hasspent applying operations from the oplog.

See also

metrics.repl.apply.batchSize

  • metrics.repl.buffer
  • MongoDB buffers oplog operations from the replication sync sourcebuffer before applying oplog entries in abatch. metrics.repl.buffer provides a way totrack the oplog buffer. SeeMultithreaded Replication for moreinformation on the oplog application process.
  • metrics.repl.buffer.count
  • The current number of operations in the oplog buffer.
  • metrics.repl.buffer.maxSizeBytes
  • The maximum size of the buffer. This value is a constant setting inthe mongod, and is not configurable.
  • metrics.repl.buffer.sizeBytes
  • The current size of the contents of the oplog buffer.
  • metrics.repl.network.getmores
  • metrics.repl.network.getmores reports on thegetmore operations, which are requests for additional resultsfrom the oplog cursor as part of the oplog replicationprocess.
  • metrics.repl.network.getmores.num
  • metrics.repl.network.getmores.num reports thetotal number of getmore operations, which are operations thatrequest an additional set of operations from the replication syncsource.

Note

This number can be quite large, as MongoDB will wait for moredata even if the getmore operation does not initial returndata.

  • metrics.repl.network.notMasterLegacyUnacknowledgedWrites
  • The number of unacknowledged (w: 0) legacy write operations (seeRequest Opcodes) that failed because the currentmongod is not in PRIMARY state.

New in version 4.2.

  • metrics.repl.network.notMasterUnacknowledgedWrites
  • The number of unacknowledged (w: 0) write operations that failedbecause the current mongod is not inPRIMARY state.

New in version 4.2.

  • metrics.repl.network.ops
  • The totalnumber of operations read from the replication source.
  • metrics.repl.network.readersCreated
  • The total number of oplog query processes created. MongoDB willcreate a new oplog query any time an error occurs in theconnection, including a timeout, or a networkoperation. Furthermore,metrics.repl.network.readersCreated willincrement every time MongoDB selects a new source for replication.
  • metrics.repl.stepDown
  • Information on user operations that were running when themongod stepped down.

New in version 4.2.

  • metrics.repl.stepDown.userOperationsKilled
  • The number of user operations killed when the mongodstepped down.

New in version 4.2.

  • metrics.repl.stepDown.userOperationsRunning
  • The number of user operations that remained running when themongod stepped down.

New in version 4.2.

  • metrics.storage.freelist.search.bucketExhausted
  • The number of times that mongod has checked the free listwithout finding a suitably large record allocation.
  • metrics.storage.freelist.search.requests
  • The number of times mongod has searched for availablerecord allocations.
  • metrics.storage.freelist.search.scanned
  • The number of available record allocations mongod hassearched.
  • metrics.ttl
  • A document that reports on the operation of the resource use of thettl index process.
  • metrics.ttl.deletedDocuments
  • The total number of documents deleted from collections with attl index.
  • metrics.ttl.passes
  • The number of times the background process removes documents fromcollections with a ttl index.
  • metrics.cursor

New in version 2.6.

A document that contains data regarding cursor state and use.

  • metrics.cursor.timedOut

New in version 2.6.

The total number of cursors that have timed out since the serverprocess started. If this number is large or growing at a regularrate, this may indicate an application error.

  • metrics.cursor.open

New in version 2.6.

A document that contains data regarding open cursors.

  • metrics.cursor.open.noTimeout

New in version 2.6.

The number of open cursors with the optionDBQuery.Option.noTimeout set to prevent timeout after aperiod of inactivity.

  • metrics.cursor.open.pinned

New in version 2.6.

The number of “pinned” open cursors.

  • metrics.cursor.open.total

New in version 2.6.

The number of cursors that MongoDB is maintaining for clients.Because MongoDB exhausts unused cursors, typically this value smallor zero. However, if there is a queue, stale tailable cursors, or alarge number of operations this value may rise.

  • metrics.cursor.open.singleTarget

New in version 3.0.

The total number of cursors that only target a single shard. Onlymongos instances reportmetrics.cursor.open.singleTarget values.

  • metrics.cursor.open.multiTarget

New in version 3.0.

The total number of cursors that only target more than one shard.Only mongos instances reportmetrics.cursor.open.multiTarget values.

watchdog

New in version 3.6.

  1. "watchdog" : {
  2. "checkGeneration" : NumberLong(<num>),
  3. "monitorGeneration" : NumberLong(<num>),
  4. "monitorPeriod" : <num>
  5. }

Note

The watchdog section is only present if the Storage Node Watchdog is enabled.

  • watchdog.checkGeneration
  • The number of times the directories have been checked since startup.Directories are checked multiple times every monitoringPeriod.
  • watchdog.monitorGeneration
  • The number of times the status of all filesystems used by mongodhas been checked. This is incremented once every monitoringPeriod.
  • watchdog.monitorPeriod
  • The value set by watchdogPeriodSeconds. This represents theperiod in between status checks.

Output Changelog