serverStatus

On this page本页内容

Definition定义

serverStatus

The serverStatus command returns a document that provides an overview of the database's state. serverStatus命令返回提供数据库状态概述的文档。Monitoring applications can run this command at a regular interval to collect statistics about the instance.监视应用程序可以定期运行此命令以集合有关实例的统计信息。

Syntax语法

The command has the following syntax:该命令具有以下语法:

db.runCommand( { serverStatus: 1 } )

The value (i.e. 1 above) does not affect the operation of the command. 该值(即上面的1)不会影响命令的操作。The db.serverStatus() command returns a large amount of data. db.serverStatus()命令返回大量数据。To return a specific object or field from the output append the object or field name to the command.要从输出中返回特定对象或字段,请将对象或字段名称附加到命令。

For example:例如:

db.runCommand({ serverStatus: 1}).metrics
db.runCommand({ serverStatus: 1}).metrics.commands
db.runCommand({ serverStatus: 1}).metrics.commands.update

mongosh provides the db.serverStatus() wrapper for the serverStatus command.mongoshserverStatus命令提供db.serverStatus()包装。

Tip提示
See also: 参阅:

Much of the output of serverStatus is also displayed dynamically by mongostat. serverStatus的大部分输出也由mongostat动态显示。See the mongostat command for more information.有关详细信息,请参阅mongostat命令。

Behavior行为

By default, serverStatus excludes in its output:默认情况下,serverStatus在其输出中排除:

  • some content in the repl document.repl文档中的一些内容。
  • mirroredReads document. 文档。(Available starting in version 4.4从4.4版开始提供)

To include fields that are excluded by default, specify the top-level field and set it to 1 in the command. 要包含默认排除的字段,请指定顶级字段并在命令中将其设置为1To exclude fields that are included by default, specify the top-level field and set to 0 in the command.要排除默认包含的字段,请指定顶级字段并在命令中设置为0

For example, the following operation suppresses the repl, metrics and locks information in the output.例如,以下操作将抑制输出中的replmetricslocks信息。

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

The following example includes all repl information in the output:以下示例包括输出中的所有repl信息:

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

Initialization初始化

The statistics reported by serverStatus are reset when the mongod server is restarted.mongod服务器重新启动时,serverStatus报告的统计信息将被重置。

This command will always return a value, even on a fresh database. 此命令将始终返回一个值,即使是在新数据库上。The related command db.serverStatus() does not always return a value unless a counter has started to increment for a particular metric.相关命令db.serverStatus()并不总是返回值,除非计数器已开始为特定度量递增。

After you run an update query, db.serverStatus() and db.runCommand({ serverStatus: 1}) both return the same values.运行更新查询后,db.serverStatus()db.runCommand({ serverStatus: 1})都返回相同的值。

{
   "arrayFilters" : NumberLong(0),
   "failed" : NumberLong(0),
   "pipeline" : NumberLong(0),
   "total" : NumberLong(1)
}

Include 包括mirroredReads

By default, the mirroredReads information (available starting in version 4.4) is not included in the output. 默认情况下,mirroredReads信息(从4.4版开始提供)不包含在输出中。To return mirroredReads information, you must explicitly specify the inclusion:要返回mirroredReads信息,必须显式指定包含项:

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

Include 包括latchAnalysis

By default, the latchAnalysis information (available starting in version 4.4) is not included in the output. 默认情况下,latchAnalysis信息(从4.4版开始提供)不包含在输出中。To return latchAnalysis information, you must explicitly specify the inclusion:要返回latchAnalysis信息,必须显式指定包含项:

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

Output输出

Note注意

The output fields vary depending on the version of MongoDB, underlying operating system platform, the storage engine, and the kind of node, including mongos, mongod or replica set member.输出字段根据MongoDB的版本、底层操作系统平台、存储引擎和节点类型(包括mongosmongod副本集成员)而有所不同。

For the serverStatus output specific to the version of your MongoDB, refer to the appropriate version of the MongoDB Manual.有关特定于MongoDB版本的serverStatus输出,请参阅MongoDB手册的相应版本。

Instance Information实例信息

"host" : <string>,
"advisoryHostFQDNs" : <array>,
"version" : <string>,
"process" : <"mongod"|"mongos">,
"pid" : NumberLong(<num>),
"uptime" : <num>,
"uptimeMillis" : NumberLong(<num>),
"uptimeEstimate" : NumberLong(<num>),
"localTime" : ISODate(""),
host

The system's hostname. In Unix/Linux systems, this should be the same as the output of the hostname command.系统的主机名。在Unix/Linux系统中,这应该与hostname命令的输出相同。

advisoryHostFQDNs

An array of the system's fully qualified domain names (FQDNs).系统的完全限定域名(FQDN)数组。

version

The MongoDB version of the current MongoDB process.当前MongoDB进程的MongoDB版本。

process

The current MongoDB process. 当前MongoDB进程。Possible values are: mongos or mongod.可能的值是:mongosmongod

pid

The process id number.进程id号。

uptime

The number of seconds that the current MongoDB process has been active.当前MongoDB进程处于活动状态的秒数。

uptimeMillis

The number of milliseconds that the current MongoDB process has been active.当前MongoDB进程处于活动状态的毫秒数。

uptimeEstimate

The uptime in seconds as calculated from MongoDB's internal course-grained time keeping system.根据MongoDB的内部课程粒度计时系统计算的正常运行时间(秒)。

localTime

The ISODate representing the current time, according to the server, in UTC.ISODate表示当前时间,根据服务器,以UTC表示。

asserts断言

"asserts" : {
   "regular" : <num>,
   "warning" : <num>,
   "msg" : <num>,
   "user" : <num>,
   "rollovers" : <num>
},
asserts

A document that reports on the number of assertions raised since the MongoDB process started. 报告自MongoDB进程启动以来引发的断言数量的文档。While assert errors are typically uncommon, if there are non-zero values for the asserts, you should examine the log file for more information. 虽然断言错误通常不常见,但如果asserts存在非零值,则应检查日志文件以获取更多信息。In many cases, these errors are trivial, but are worth investigating.在许多情况下,这些错误微不足道,但值得调查。

asserts.regular

The number of regular assertions raised since the MongoDB process started. 自MongoDB进程启动以来引发的常规断言数。Examine the log file for more information about these messages.有关这些消息的详细信息,请检查日志文件。

asserts.warning

Changed in version 4.0.在版本4.0中更改

Starting in MongoDB 4.0, the field returns zero 0.从MongoDB 4.0开始,该字段返回0

In earlier versions, the field returns the number of warnings raised since the MongoDB process started.在早期版本中,该字段返回自MongoDB进程启动以来引发的警告数。

asserts.msg

The number of message assertions raised since the MongoDB process started. 自MongoDB进程启动以来引发的消息断言数。Examine the log file for more information about these messages.有关这些消息的详细信息,请检查日志文件。

asserts.user

The number of "user asserts" that have occurred since the last time the MongoDB process started. 自上次启动MongoDB进程以来发生的“用户断言”数。These are errors that user may generate, such as out of disk space or duplicate key. 这些是用户可能产生的错误,例如磁盘空间不足或密钥重复。You can prevent these assertions by fixing a problem with your application or deployment. Examine the MongoDB log for more information.您可以通过修复应用程序或部署的问题来防止这些断言。有关详细信息,请查看MongoDB日志。

asserts.rollovers

The number of times that the rollover counters have rolled over since the last time the MongoDB process started. 自上次启动MongoDB进程以来,滚动计数器滚动的次数。The counters will rollover to zero after 2 30 assertions. 在230次断言之后,计数器将滚动到零。Use this value to provide context to the other values in the asserts data structure.使用此值为asserts数据结构中的其他值提供上下文。

bucketCatalog

"bucketCatalog" : {
    "numBuckets" : <num>,
    "numOpenBuckets" : <num>,
    "numIdleBuckets" : <num>,
    "memoryUsage" : <num>
 }

New in version 5.0.在版本5.0中新增

A document that reports metrics related to the internal storage of time series collections.报告与时间序列集合的内部存储相关的度量的文档。

The bucketCatalog returns the following metrics:bucketCatalog返回以下指标:

MetricDescription描述
numBucketsThe number of buckets that store time series data internally.内部存储时间序列数据的存储桶数。
numOpenBucketsThe number of active, uncommitted writes to buckets.对存储桶的活动未提交写入次数。
numIdleBucketsThe number of buckets that are not full and can store incoming time series data. 未满且可存储传入时间序列数据的存储桶数。
memoryUsageThe number of bytes used by internal bucketing data structures.内部分块数据结构使用的字节数。

New in version 5.0.在版本5.0中新增

connections连接

"connections" : {
   "current" : <num>,
   "available" : <num>,
   "totalCreated" : <num>,
   "active" : <num>,
   "threaded" : <num>,
   "exhaustIsMaster" : <num>,
   "exhaustHello" : <num>,
   "awaitingTopologyChanges" : <num>,
   "loadBalanced" : <num>
},
connections

A document that reports on the status of the connections. 报告连接状态的文档。Use these values to assess the current load and capacity requirements of the server.使用这些值评估服务器的当前负载和容量需求。

connections.current

The number of incoming connections from clients to the database server. 从客户端到数据库服务器的传入连接数。This number includes the current shell session. 此数字包括当前shell会话。Consider the value of connections.available to add more context to this datum.考虑connections.available的值向此datum添加更多上下文。

The value will include all incoming connections including any shell connections or connections from other servers, such as replica set members or mongos instances.该值将包括所有传入连接,包括任何shell连接或来自其他服务器的连接,例如副本集成员或mongos实例。

connections.available

The number of unused incoming connections available. 可用的未使用传入连接数。Consider this value in combination with the value of connections.current to understand the connection load on the database, and the UNIX ulimit Settings document for more information about system thresholds on available connections.将此值与connections.current的值结合起来考虑,以了解数据库上的连接负载,有关可用连接的系统阈值的更多信息,请参阅UNIX ulimit设置文档。

connections.totalCreated

Count of all incoming connections created to the server. 创建到服务器的所有传入连接的计数。This number includes connections that have since closed.此数字包括自关闭以来的连接。

connections.active

The number of active client connections to the server. 与服务器的活动客户端连接数。Active client connections refers to client connections that currently have operations in progress.活动客户端连接是指当前正在进行操作的客户端连接。

New in version 4.0.7.在版本4.0.7中新增

connections.threaded

The number of incoming connections from clients that are assigned to threads that service client requests.来自分配给服务客户端请求的线程的客户端的传入连接数。

New in version 5.0.在版本5.0中新增

connections.exhaustIsMaster

The number of connections whose last request was an isMaster request with exhaustAllowed.上一个请求是带有exhaustAllowedisMaster请求的连接数。

Note注意

If you are running MongoDB 5.0 or later, do not use the isMaster command. 如果您正在运行MongoDB 5.0或更高版本,请不要使用isMaster命令。Instead, use hello.相反,使用hello

New in version 4.4.在版本4.4中新增

connections.exhaustHello

The number of connections whose last request was a hello request with exhaustAllowed.最后一个请求是带有exhaustAllowed的hello请求的连接数。

New in version 5.0.在版本5.0中新增 (and 4.4.2)

connections.awaitingTopologyChanges

The number of clients currently waiting in a hello or isMaster request for a topology change.当前在helloisMaster请求中等待拓扑更改的客户端数。

Note注意

If you are running MongoDB 5.0 or later, do not use the isMaster command. 如果您正在运行MongoDB 5.0或更高版本,请不要使用isMaster命令。Instead, use hello.相反,使用hello

New in version 4.4.在版本4.4中新增

connections.loadBalanced

New in version 5.3.在版本5.3中新增

The current number of incoming connections received through the load balancer.当前通过负载平衡器接收的传入连接数。

defaultRWConcern

Available starting in 4.4从4.4开始提供

The defaultRWConcern section provides information on the local copy of the global default read or write concern settings. defaultRWConcern部分提供有关全局默认读或写问题设置的本地副本的信息。The data may be stale or out of date. 数据可能已过时或过期。See getDefaultRWConcern for more information.有关更多信息,请参阅getDefaultRWConcern

"defaultRWConcern" : {
  "defaultReadConcern" : {
    "level" : <string>
  },
  "defaultWriteConcern" : {
    "w" : <string> | <int>,
    "wtimeout" : <int>,
    "j" : <bool>
  },
  "defaultWriteConcernSource": <string>,
  "defaultReadConcernSource": <string>,
  "updateOpTime" : Timestamp,
  "updateWallClockTime" : Date,
  "localUpdateWallClockTime" : Date
}
defaultRWConcern

The last known global default read or write concern settings.最后一个已知的全局默认读取或写入问题设置。

New in version 4.4.在版本4.4中新增

defaultRWConcern.defaultReadConcern

The last known global default read concern setting.最后一个已知的全局默认读取问题设置。

If serverStatus does not return this field, the global default read concern has either not been set or has not yet propagated to the instance.如果serverStatus未返回此字段,则表示全局默认读取问题尚未设置或尚未传播到实例。

New in version 4.4.在版本4.4中新增

defaultRWConcern.defaultReadConcern.level

The last known global default read concern level setting.最后一个已知的全局默认读取问题级别设置。

If serverStatus does not return this field, the global default for this setting has either not been set or has not yet propagated to the instance.如果serverStatus未返回此字段,则该设置的全局默认值尚未设置或尚未传播到实例。

New in version 4.4.在版本4.4中新增

defaultRWConcern.defaultWriteConcern

The last known global default write concern setting.最后一个已知的全局默认写入关注设置。

If serverStatus does not return this field, the global default write concern has either not been set or has not yet propagated to the instance.如果serverStatus未返回此字段,则表示全局默认写入问题尚未设置或尚未传播到实例。

New in version 4.4.在版本4.4中新增

defaultRWConcern.defaultWriteConcern.w

The last known global default w setting.最后一个已知的全局默认w设置。

If serverStatus does not return this field, the global default for this setting has either not been set or has not yet propagated to the instance.如果serverStatus未返回此字段,则该设置的全局默认值尚未设置或尚未传播到实例。

New in version 4.4.在版本4.4中新增

defaultRWConcern.defaultWriteConcern.wtimeout

The last known global default wtimeout setting.最后一个已知的全局默认wtimeout设置。

If serverStatus does not return this field, the global default for this setting has either not been set or has not yet propagated to the instance.如果serverStatus未返回此字段,则该设置的全局默认值尚未设置或尚未传播到实例。

New in version 4.4.在版本4.4中新增

defaultRWConcern.defaultWriteConcernSource

The source of the default write concern. 默认写入关注的来源。By default, the value is "implicit". 默认情况下,该值为"implicit"Once you set the default write concern with setDefaultRWConcern, the value becomes "global".使用setDefaultRWConcern设置默认写入关注点后,该值将变为"global"

New in version 5.0.在版本5.0中新增

defaultRWConcern.defaultReadConcernSource

The source of the default read concern. 默认读取关注的来源。By default, the value is "implicit". 默认情况下,该值为"implicit"Once you set the default read concern with setDefaultRWConcern, the value becomes "global".使用setDefaultRWConcern设置默认读取关注点后,该值将变为"global"

New in version 5.0.在版本5.0中新增

defaultRWConcern.updateOpTime

The timestamp when the instance last updated its copy of any global read or write concern settings. 实例上次更新任何全局读或写问题设置的副本时的时间戳。If the defaultRWConcern.defaultReadConcern and defaultRWConcern.defaultWriteConcern fields are absent, this field indicates the timestamp when the defaults were last unset.如果缺少defaultRWConcern.defaultReadConcerndefaultRWConcern.defaultWriteConcern字段,则此字段表示上次未设置默认值时的时间戳。

New in version 4.4.在版本4.4中新增

defaultRWConcern.updateWallClockTime

The wall clock time when the instance last updated its copy of any global read or write concern settings. 实例上次更新任何全局读或写问题设置的副本时的时钟时间。If the defaultRWConcern.defaultReadConcern and defaultRWConcern.defaultWriteConcern fields are absent, this field indicates the time when the defaults were last unset.如果缺少defaultRWConcern.defaultReadConcerndefaultRWConcern.defaultWriteConcern字段,则此字段表示上次未设置默认值的时间。

New in version 4.4.在版本4.4中新增

defaultRWConcern.localUpdateWallClockTime

The local system wall clock time when the instance last updated its copy of any global read or write concern setting. 实例上次更新任何全局读或写问题设置的副本时的本地系统时钟时间。If this field is the only field under defaultRWConcern, the instance has never had knowledge of a global default read or write concern setting.如果此字段是defaultRWConcern下的唯一字段,则该实例从未了解全局默认读或写问题设置。

New in version 4.4.在版本4.4中新增

electionMetrics

Available starting in 4.2.1 (and 4.0.13)从4.2.1(和4.0.13)开始提供

The electionMetrics section provides information on elections called by this mongod instance in a bid to become the primary:electionMetrics部分提供了有关此mongod实例为争取成为初选而进行的选举的信息:

"electionMetrics" : {
   "stepUpCmd" : {
      "called" : NumberLong(<num>),
      "successful" : NumberLong(<num>)
   },
   "priorityTakeover" : {
      "called" : NumberLong(<num>),
      "successful" : NumberLong(<num>)
   },
   "catchUpTakeover" : {
      "called" : NumberLong(<num>),
      "successful" : NumberLong(<num>)
   },
   "electionTimeout" : {
      "called" : NumberLong(<num>),
      "successful" : NumberLong(<num>)
   },
   "freezeTimeout" : {
      "called" : NumberLong(<num>),
      "successful" : NumberLong(<num>)
   },
   "numStepDownsCausedByHigherTerm" : NumberLong(<num>),
   "numCatchUps" : NumberLong(<num>),
   "numCatchUpsSucceeded" : NumberLong(<num>),
   "numCatchUpsAlreadyCaughtUp" : NumberLong(<num>),
   "numCatchUpsSkipped" : NumberLong(<num>),
   "numCatchUpsTimedOut" : NumberLong(<num>),
   "numCatchUpsFailedWithError" : NumberLong(<num>),
   "numCatchUpsFailedWithNewTerm" : NumberLong(<num>),
   "numCatchUpsFailedWithReplSetAbortPrimaryCatchUpCmd" : NumberLong(<num>),
   "averageCatchUpOps" : <double>
}
electionMetrics.stepUpCmd

Metrics on elections that were called by the mongod instance as part of an election handoff when the primary stepped down.当初选结束时,mongod实例称之为选举交接的一部分的选举指标。

The stepUpCmd includes both the number of elections called and the number of elections that succeeded.stepUpCmd包括调用的选举数和成功的选举数。

Available starting in 4.2.1 (and 4.0.13)从4.2.1(和4.0.13)开始提供

electionMetrics.priorityTakeover

Metrics on elections that were called by the mongod instance because its priority is higher than the primary's.mongod实例调用的选举指标,因为其priority高于初选。

The electionMetrics.priorityTakeover includes both the number of elections called and the number of elections that succeeded.electionMetrics.priorityTakeover包括被召集的选举数量和成功的选举数量。

Available starting in 4.2.1 (and 4.0.13)

electionMetrics.catchUpTakeover

Metrics on elections called by the mongod instance because it is more current than the primary.mongod实例调用的选举指标,因为它比初选更为流行。

The catchUpTakeover includes both the number of elections called and the number of elections that succeeded.catchUpTakeover包括被召集的选举数量和成功的选举数量。

Tip提示

Available starting in 4.2.1 (and 4.0.13)从4.2.1(和4.0.13)开始提供

electionMetrics.electionTimeout

Metrics on elections called by the mongod instance because it has not been able to reach the primary within settings.electionTimeoutMillis.mongod实例调用的选举指标,因为它无法在settings.electionTimeoutMillis内进入初选。

The electionTimeout includes both the number of elections called and the number of elections that succeeded.electionTimeout包括已调用的选举数和成功的选举数。

Tip提示
See also: 参阅:

Available starting in 4.2.1 (and 4.0.13)从4.2.1(和4.0.13)开始提供

electionMetrics.freezeTimeout

Metrics on elections called by the mongod instance after its freeze period (during which the member cannot seek an election) has expired.mongod实例在冻结期(在此期间,成员无法寻求选举)到期后调用的选举指标。

The electionMetrics.freezeTimeout includes both the number of elections called and the number of elections that succeeded.electionMetrics.freezeTimeout包括调用的选举数和成功的选举数。

Available starting in 4.2.1 (and 4.0.13)从4.2.1(和4.0.13)开始提供

electionMetrics.numStepDownsCausedByHigherTerm

Number of times the mongod instance stepped down because it saw a higher term (specifically, other member(s) participated in additional elections).mongod实例因任期较长而下台的次数(具体而言,其他成员参加了额外的选举)。

Available starting in 4.2.1 (and 4.0.13)从4.2.1(和4.0.13)开始提供

electionMetrics.numCatchUps

Number of elections where the mongod instance as the newly-elected primary had to catch up to the highest known oplog entry.作为新当选初选的mongod实例必须赶上已知最高oplog条目的选举次数。

Available starting in 4.2.1 (and 4.0.13)从4.2.1(和4.0.13)开始提供

electionMetrics.numCatchUpsSucceeded

Number of times the mongod instance as the newly-elected primary successfully caught up to the highest known oplog entry.mongod实例作为新当选的主实例成功赶上已知最高oplog条目的次数。

Available starting in 4.2.1 (and 4.0.13)从4.2.1(和4.0.13)开始提供

electionMetrics.numCatchUpsAlreadyCaughtUp

Number of times the mongod instance as the newly-elected primary concluded its catchup process because it was already caught up when elected.作为新当选的初选的mongod实例结束追赶过程的次数,因为它在当选时已经赶上了。

Available starting in 4.2.1 (and 4.0.13)从4.2.1(和4.0.13)开始提供

electionMetrics.numCatchUpsSkipped

Number of times the mongod instance as the newly-elected primary skipped the catchup process.作为新当选的主要成员的mongod实例跳过追赶过程的次数。

Available starting in 4.2.1 (and 4.0.13)

electionMetrics.numCatchUpsTimedOut

Number of times the mongod instance as the newly-elected primary concluded its catchup process because of the settings.catchUpTimeoutMillis limit.由于设置了settings.catchUpTimeoutMillis限制,作为新当选初选的mongod实例结束追赶过程的次数。

Available starting in 4.2.1 (and 4.0.13)从4.2.1(和4.0.13)开始提供

electionMetrics.numCatchUpsFailedWithError

Number of times the newly-elected primary's catchup process failed with an error.新当选的初选过程因错误而失败的次数。

Available starting in 4.2.1 (and 4.0.13)从4.2.1(和4.0.13)开始提供

electionMetrics.numCatchUpsFailedWithNewTerm

Number of times the newly-elected primary's catchup process concluded because another member(s) had a higher term (specifically, other member(s) participated in additional elections).新当选的初选因另一名成员任期较长(具体而言,其他成员参加了额外选举)而结束的追赶过程的次数。

Available starting in 4.2.1 (and 4.0.13)从4.2.1(和4.0.13)开始提供

electionMetrics.numCatchUpsFailedWithReplSetAbortPrimaryCatchUpCmd

Number of times the newly-elected primary's catchup process concluded because the mongod received the replSetAbortPrimaryCatchUp command.由于mongod接收到replSetAbortPrimaryCatchUp命令而导致新当选的主节点的追赶过程结束的次数。

Available starting in 4.2.1 (and 4.0.13)从4.2.1(和4.0.13)开始提供

electionMetrics.averageCatchUpOps

Average number of operations applied during the newly-elected primary's catchup processes.在新当选的初选追赶过程中应用的平均操作数。

Available starting in 4.2.1

extra_info

"extra_info" : {
   "note" : "fields vary by platform.",
   "heap_usage_bytes" : <num>,
   "page_faults" : <num>
},
extra_info

A document that provides additional information about the underlying system.提供有关底层系统的附加信息的文档。

extra_info.note

A string with the text "fields vary by platform."带有文本"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.仅在Unix/Linux系统上可用。

extra_info.page_faults

The total number of page faults. 页面错误的总数。The extra_info.page_faults counter may increase dramatically during moments of poor performance and may correlate with limited memory environments and larger data sets. extra_info.page_faults计数器在性能不佳的时刻可能会显著增加,并且可能与有限的内存环境和较大的数据集相关。Limited and sporadic page faults do not necessarily indicate an issue.有限的和偶发的页面错误不一定表明存在问题。

Windows differentiates "hard" page faults involving disk I/O from "soft" page faults that only require moving pages in memory. Windows将涉及磁盘I/O的“硬”页面故障与只需要在内存中移动页面的“软”页面故障区分开来。MongoDB counts both hard and soft page faults in this statistic.MongoDB在此统计中同时统计硬页面和软页面错误。

flowControl

New in version 4.2.在版本4.2中新增

"flowControl" : {
   "enabled" : <boolean>,
   "targetRateLimit" : <int>,
   "timeAcquiringMicros" : NumberLong(<num>),
   "locksPerKiloOp" : <double>,  // Available in 4.4+. In 4.2, returned locksPerOp instead.
   "sustainerRate" : <int>,
   "isLagged" : <boolean>,
   "isLaggedCount" : <int>,
   "isLaggedTimeMicros" : NumberLong(<num>)
},
flowControl

A document that returns statistics on the Flow Control. 返回流控制统计信息的文档。With flow control enabled, as the majority commit point lag grows close to the flowControlTargetLagSeconds, writes on the primary must obtain tickets before taking locks. 在启用流控制的情况下,由于多数提交点延迟接近flowControlTargetLagSeconds,因此在获取锁之前,对主节点的写入必须获得票证。As such, the metrics returned are meaningful when run on the primary.因此,当在主服务器上运行时,返回的度量是有意义的。

New in version 4.2.在版本4.2中新增

flowControl.enabled

A boolean that indicates whether Flow Control is enabled (true) or disabled (false).一个布尔值,指示流控制是启用(true)还是禁用(false)。

See also enableFlowControl.另请参阅enableFlowControl

New in version 4.2.在版本4.2中新增

flowControl.targetRateLimit

When run on the primary, the maximum number of tickets that can be acquired per second.在主服务器上运行时,每秒可获取的最大票证数。

When run on a secondary, the returned number is a placeholder.在辅助服务器上运行时,返回的数字是占位符。

New in version 4.2.在版本4.2中新增

flowControl.timeAcquiringMicros

When run on the primary, the total time write operations have waited to acquire a ticket.在主服务器上运行时,写入操作等待获取票证的总时间。

When run on a secondary, the returned number is a placeholder.在辅助服务器上运行时,返回的数字是占位符。

New in version 4.2.在版本4.2中新增

flowControl.locksPerKiloOp
Note注意
Starting in MongoDB 4.4从MongoDB 4.4开始

locksPerKiloOp replaces locksPerOp field. locksPerKiloOp替换locksPerOp字段。locksPerOp field is available only on version 4.2.locksPerOp字段仅在4.2版上可用。

When run on the primary, an approximation of the number of locks taken per 1000 operations.在主服务器上运行时,每1000次操作所取锁的数量的近似值。

When run on a secondary, the returned number is a placeholder.在辅助服务器上运行时,返回的数字是占位符。

New in version 4.4.在版本4.4中新增

flowControl.locksPerOp
Note注意
Available on MongoDB 4.2 only仅在MongoDB 4.2上可用

MongoDB 4.4 replaces locksPerOp with flowControl.locksPerKiloOp.MongoDB 4.4将locksPerOp替换为flowControl.locksPerKiloOp

When run on the primary, an approximation of the number of locks taken per operation.在主服务器上运行时,每个操作所取锁的数量的近似值。

When run on a secondary, the returned number is a placeholder.在辅助服务器上运行时,返回的数字是占位符。

New in version 4.2.在版本4.2中新增

flowControl.sustainerRate

When run on the primary, an approximation of operations applied per second 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.在版本4.2中新增

flowControl.isLagged

When run on the primary, a boolean that indicates whether flow control has engaged. 在主服务器上运行时,一个布尔值,指示流控制是否已启用。Flow control engages when the majority committed lag is greater than some percentage of the configured flowControlTargetLagSeconds.当大多数提交的延迟大于配置的flowControlTargetLagSeconds的某个百分比时,流控制启动。

Replication lag can occur without engaging flow control. 复制延迟可能会发生,而无需参与流量控制。An unresponsive secondary might lag without the replica set receiving sufficient load to engage flow control, leaving the flowControl.isLagged value at false.无响应的secondary可能会延迟,而副本集没有接收到足够的负载来参与流控制,从而使flowControl.isLagged值为false

For additional information, see Flow Control.有关更多信息,请参阅流量控制

New in version 4.2.在版本4.2中新增

flowControl.isLaggedCount

When run on a primary, the number of times flow control has engaged since the last restart. 在主计算机上运行时,自上次重新启动以来,流量控制已启用的次数。Flow control engages when the majority committed lag is greater than some percentage of the flowControlTargetLagSeconds.当大多数提交的延迟大于flowControlTargetLagSeconds的某个百分比时,流控制启用。

When run on a secondary, the returned number is a placeholder.在辅助服务器上运行时,返回的数字是占位符。

New in version 4.2.在版本4.2中新增

flowControl.isLaggedTimeMicros

When run on the primary, the amount of time flow control has spent being engaged since the last restart. 在主服务器上运行时,自上次重新启动以来,流控制占用的时间量。Flow control engages when the majority committed lag is greater than some percentage of the flowControlTargetLagSeconds.当大多数提交的延迟大于flowControlTargetLagSeconds的某个百分比时,流控制启用。

When run on a secondary, the returned number is a placeholder.在辅助服务器上运行时,返回的数字是占位符。

New in version 4.2.在版本4.2中新增

freeMonitoring

"freeMonitoring" : {
   "state" : <string>,
   "retryIntervalSecs" : NumberLong(<num>),
   "lastRunTime" : <string>,
   "registerErrors" : NumberLong(<num>),
   "metricsErrors" : NumberLong(<num>)
},
freeMonitoring

A document that reports on the free Cloud monitoring.报告免费云监控的文档。

freeMonitoring.state

The enablement state of free monitoring. 自由监控的启用状态。The values can be one of the 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 HTTP status or network errors.注册错误数,在出现意外HTTP状态或网络错误时递增。

freeMonitoring.metricsErrors

The number of errors encountered when uploading metrics.上载度量时遇到的错误数。

globalLock

"globalLock" : {
   "totalTime" : NumberLong(<num>),
   "currentQueue" : {
      "total" : <num>,
      "readers" : <num>,
      "writers" : <num>
   },
   "activeClients" : {
      "total" : <num>,
      "readers" : <num>,
      "writers" : <num>
   }
},
globalLock

A document that reports on the database's lock state.报告数据库锁定状态的文档。

Generally, the locks document provides more detailed data on lock uses.通常,文档提供了有关锁使用的更详细的数据。

globalLock.totalTime

The time, in microseconds, since the database last started and created the globalLock. 自数据库上次启动并创建globalLock以来的时间(以微秒为单位)。This is approximately equivalent to the total server uptime.这大约相当于服务器的总运行时间。

globalLock.currentQueue

A document that provides information concerning the number of operations queued because of a lock.提供有关由于锁而排队的操作数的信息的文档。

globalLock.currentQueue.total

The total number of operations queued waiting for the lock (i.e., the sum of globalLock.currentQueue.readers and globalLock.currentQueue.writers).排队等待锁的操作总数(即,globalLock.currentQueue.readersglobalLock.currentQueue.writers的总和)。

A consistently small queue, particularly of shorter operations, should cause no concern. 持续较小的队列,特别是较短的操作,应该不会引起任何担忧。The globalLock.activeClients readers and writers information provides context for this data.globalLock.activeClients读取器和写入器信息提供了此数据的上下文。

globalLock.currentQueue.readers

The number of operations that are currently queued and waiting for the read lock. 当前排队等待读取锁定的操作数。A consistently small read queue, particularly of shorter operations, should cause no concern.始终较小的读取队列,尤其是较短的操作,应该不会引起任何问题。

globalLock.currentQueue.writers

The number of operations that are currently queued and waiting for the write lock. 当前排队等待写入锁定的操作数。A consistently small write queue, particularly of shorter operations, is no cause for concern.持续较小的写入队列,特别是较短的操作,不需要担心。

globalLock.activeClients

A document that provides information about the number of connected clients and the read and write operations performed by these clients.一种文档,提供有关连接的客户端数量以及这些客户端执行的读写操作的信息。

Use this data to provide context for the globalLock.currentQueue data.使用此数据为globalLock.currentQueue数据提供上下文。

globalLock.activeClients.total

The total number of internal client connections to the database including system threads as well as queued readers and writers. 数据库的内部客户端连接总数,包括系统线程以及排队的读取器和写入器。This metric will be higher than the total of activeClients.readers and activeClients.writers due to the inclusion of system threads.由于包含系统线程,此度量将高于activeClients.readersactiveClients.writers的总和。

globalLock.activeClients.readers

The number of the active client connections performing read operations.执行读取操作的活动客户端连接数。

globalLock.activeClients.writers

The number of active client connections performing write operations.执行写入操作的活动客户端连接数。

hedgingMetrics

New in version 4.4.在版本4.4中新增 For mongos instances only.仅适用于mongos实例。

"hedgingMetrics" : {
   "numTotalOperations" : <num>,
   "numTotalHedgedOperations" : <num>,
   "numAdvantageouslyHedgedOperations" : <num>
},
hedgingMetrics

Provides metrics on hedged reads for the mongos instance.提供mongos实例的对冲读取指标。

New in version 4.4.在版本4.4中新增 For mongos instances only.仅适用于mongos实例。

hedgingMetrics.numTotalOperations

The total number of the operations issued with the hedged read option enabled to this mongos instance.mongos实例启用对冲读取选项后发行的操作总数。

New in version 4.4.在版本4.4中新增 For mongos instances only.仅适用于mongos实例。

hedgingMetrics.numTotalHedgedOperations

The number of all operations for which the mongos instance hedged the read operation; i.e. sent the operation to an additional member of each queried shard.mongos实例对冲读取操作的所有操作的数量;即,将操作发送给每个查询分片的另一个成员。

New in version 4.4.在版本4.4中新增 For mongos instances only.仅适用于mongos实例。

hedgingMetrics.numAdvantageouslyHedgedOperations

The total number of the operation where the additional read sent to hedge the read operation fulfilled the client request.对冲读取操作而发送的附加读取满足客户端请求的操作总数。

New in version 4.4.在版本4.4中新增 For mongos instances only.仅适用于mongos实例。

latchAnalysis

New in version 4.4.在版本4.4中新增

"latchAnalysis" : {
   <latch name> : {
      "created" : <num>,
      "destroyed" : <num>,
      "acquired" : <num>,
      "released" : <num>,
      "contended" : <num>,
      "hierarchicalAcquisitionLevelViolations" : {
            "onAcquire" : <num>,
            "onRelease" : <num>
      }
   },
   ...
latchAnalysis

A document that reports on metrics related to internal locking primitives (also known as latches).报告与内部锁定原语(也称为锁存器)相关的度量的文档。

To return latchAnalysis information, you must explicitly specify the inclusion:要返回latchAnalysis信息,必须显式指定包含项:

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

The latchAnalysis returns for each latch the <latch name> and the following associated metrics:latchAnalysis为每个闩锁返回<latchname>和以下相关度量:

Metric米制的Description描述
createdNumber of times the latch was created.创建闩锁的次数。
destroyedNumber of times the latch was destroyed.闩锁被破坏的次数。
acquiredNumber of times the latch was acquired.获取闩锁的次数。
releasedNumber of times the latch was released.释放闩锁的次数。
contendedNumber of times the latch had contention.闩锁发生争用的次数。
hierarchicalAcquisitionLevelViolations

Only returned if violations exist仅当存在冲突时返回

Contains the following fields:包含以下字段:

  • onAcquire

    • Number of times the latch hierarchy (i.e. the latch level ordering) has been violated during latch acquisition.在锁存获取期间违反锁存层次结构(即锁存级别排序)的次数。
  • onRelease

    • Number of times the latch hierarchy (i.e. the latch level ordering) has been violated during latch release.闩锁释放期间违反闩锁层次结构(即闩锁级别排序)的次数。

New in version 4.4.在版本4.4中新增

logicalSessionRecordCache

"logicalSessionRecordCache" : {
   "activeSessionsCount" : <num>,
   "sessionsCollectionJobCount" : <num>,
   "lastSessionsCollectionJobDurationMillis" : <num>,
   "lastSessionsCollectionJobTimestamp" : <Date>,
   "lastSessionsCollectionJobEntriesRefreshed" : <num>,
   "lastSessionsCollectionJobEntriesEnded" : <num>,
   "lastSessionsCollectionJobCursorsClosed" : <num>,
   "transactionReaperJobCount" : <num>,
   "lastTransactionReaperJobDurationMillis" : <num>,
   "lastTransactionReaperJobTimestamp" : <Date>,
   "lastTransactionReaperJobEntriesCleanedUp" : <num>,
   "sessionCatalogSize" : <num>   // Starting in MongoDB 4.2
},
logicalSessionRecordCache

Provides metrics around the caching of server sessions.提供有关服务器会话缓存的指标。

logicalSessionRecordCache.activeSessionsCount

The number of all active local sessions cached in memory by the mongod or mongos instance since the last refresh period.自上次刷新周期以来,mongodmongos实例缓存在内存中的所有活动本地会话数。

Tip提示
logicalSessionRecordCache.sessionsCollectionJobCount

The number that tracks the number of times the refresh process has run on the config.system.sessions collection.跟踪刷新进程在config.system.sessions集合上运行的次数的数字。

Tip提示
See also: 参阅:
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 last config.system.sessions collection refresh.上次config.system.sessions集合刷新期间关闭的游标数。

logicalSessionRecordCache.transactionReaperJobCount

The number that tracks the number of times the transaction record cleanup process has run on the config.transactions collection.跟踪事务记录清理进程在config.transactions集合上运行的次数。

logicalSessionRecordCache.lastTransactionReaperJobDurationMillis

The length (in milliseconds) 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 collection that were deleted during the last transaction record cleanup.在上次事务记录清理期间删除的config.transactions集合中的条目数。

logicalSessionRecordCache.sessionCatalogSize

New in version 4.2.在版本4.2中新增

locks

"locks" : {
   <type> : {
         "acquireCount" : {
            <mode> : NumberLong(<num>),
            ...
         },
         "acquireWaitCount" : {
            <mode> : NumberLong(<num>),
            ...
         },
         "timeAcquiringMicros" : {
            <mode> : NumberLong(<num>),
            ...
         },
         "deadlockCount" : {
            <mode> : NumberLong(<num>),
            ...
         }
   },
   ...
locks

A document that reports for each lock <type>, data on lock <modes>.报告每个锁<type>的文档,锁<modes>上的数据。

The possible lock <types> are:

Lock TypeDescription描述
ParallelBatchWriterMode

Represents a lock for parallel batch writer mode.表示并行批处理编写器模式的锁。

In earlier versions, PBWM information was reported as part of the Global lock information.在早期版本中,PBWM信息被报告为Global锁信息的一部分。

New in version 4.2.在版本4.2中新增

ReplicationStateTransition

Represents lock taken for replica set member state transitions.表示副本集成员状态转换所用的锁。

New in version 4.2.在版本4.2中新增

GlobalRepresents global lock.表示全局锁。
DatabaseRepresents database lock.表示数据库锁。
CollectionRepresents collection lock.表示集合锁。
MutexRepresents mutex.表示互斥体。
MetadataRepresents metadata lock.表示元数据锁。
oplogRepresents lock on the oplog.表示oplog上的锁。

The possible <modes> are:可能的<modes>有:

Lock ModeDescription描述
RRepresents Shared (S) lock.
WRepresents Exclusive (X) lock.表示独占(X)锁。
rRepresents Intent Shared (IS) lock.表示意向共享(IS)锁。
wRepresents Intent Exclusive (IX) lock.表示Intent Exclusive(IX)锁。

All values are of the NumberLong() type.所有值都是NumberLong()类型。

locks.<type>.acquireCount

Number of times the lock was acquired in the specified mode.在指定模式下获取锁的次数。

locks.<type>.acquireWaitCount

Number of times the locks.<type>.acquireCount lock acquisitions encountered waits because the locks were held in a conflicting mode.锁定的次数locks.<type>.acquireCount锁获取遇到等待,因为锁处于冲突模式。

locks.<type>.timeAcquiringMicros

Cumulative wait time in microseconds for the lock acquisitions.锁获取的累计等待时间(以微秒为单位)。

locks.<type>.timeAcquiringMicros divided by locks.<type>.acquireWaitCount gives an approximate average wait time for the particular lock mode.locks.<type>.timeAcquiringMicros除以locks.<type>.acquireWaitCount提供特定锁定模式的近似平均等待时间。

locks.<type>.deadlockCount

Number of times the lock acquisitions encountered deadlocks.锁获取遇到死锁的次数。

mirroredReads

Available on mongod only.仅在mongod上可用。

"mirroredReads" : {
      "seen" : <num>,
      "sent" : <num>
},
mirroredReads

Available on mongod only.仅在mongod上可用。

A document that reports on mirrored reads. 报告镜像读取的文档。To return mirroredReads information, you must explicitly specify the inclusion:要返回mirroredReads信息,必须显式指定包含项:

db.runCommand( { serverStatus: 1, mirroredReads: 1 } )
mirroredReads.seen

New in version 4.4.在版本4.4中新增

The number of operations that support mirroring received by this member.此成员接收的支持镜像的操作数

Tip提示
See also: 参阅:

mirrorReads Parameter参数

mirroredReads.sent

New in version 4.4.在版本4.4中新增

The number of mirrored reads sent by this member when primary. 主成员时此成员发送的镜像读取数。For example, if a read is mirrored and sent to two secondaries, the number of mirrored reads is 2.例如,如果一个读取被镜像并发送到两个辅助设备,则镜像读取的数量为2

Tip提示
See also: 参阅:

mirrorReads Parameter参数

network

"network" : {
   "bytesIn" : NumberLong(<num>),
   "bytesOut" : NumberLong(<num>),
   "numSlowDNSOperations" : NumberLong(<num>),
   "numSlowSSLOperations" : NumberLong(<num>),
   "numRequests" : NumberLong(<num>),
   "tcpFastOpen" : {
      "kernelSetting" : NumberLong(<num>),
      "serverSupported" : <bool>,
      "clientSupported" : <bool>,
      "accepted" : NumberLong(<num>)
   },
   "serviceExecutors" : {
      "passthrough" : {
         "threadsRunning" : <num>,
         "clientsInTotal" : <num>,
         "clientsRunning" : <num>,
         "clientsWaitingForData" : <num>
      },
      "fixed" : {
         "threadsRunning" : <num>,
         "clientsInTotal" : <num>,
         "clientsRunning" : <num>,
         "clientsWaitingForData" : <num>
      }
   }
},
network

A document that reports data on MongoDB's network use. 报告MongoDB网络使用数据的文档。These statistics measure ingress connections only, specifically the traffic seen by the mongod or mongos over network connections initiated by clients or other mongod or mongos instances. 这些统计数据仅测量入口连接,特别是mongodmongos通过客户端或其他mongodmongos实例发起的网络连接看到的流量。Traffic from network connections initiated by this mongod or mongos instance (specifically, egress connections) is not measured in these statistics.这些统计数据中没有测量由该mongodmongos实例(特别是出口连接)发起的网络连接的流量。

network.bytesIn

The total number of bytes that the server has received over network connections initiated by clients or other mongod or mongos instances.服务器通过客户端或其他mongodmongos实例发起的网络连接接收的总字节数。

network.bytesOut

The total number of bytes that the server has sent over network connections initiated by clients or other mongod or mongos instances.服务器通过客户端或其他mongodmongos实例发起的网络连接发送的总字节数。

network.numSlowDNSOperations

New in version 4.4.在版本4.4中新增

The total number of DNS resolution operations which took longer than 1 second.耗时超过1秒的DNS解析操作总数。

network.numSlowSSLOperations

New in version 4.4.在版本4.4中新增

The total number of SSL handshake operations which took longer than 1 second.耗时超过1秒的SSL握手操作总数。

network.numRequests

The total number of distinct requests that the server has received. 服务器已接收的不同请求的总数。Use this value to provide context for the network.bytesIn and network.bytesOut values to ensure that MongoDB's network utilization is consistent with expectations and application use.使用此值为network.bytesInnetwork.bytesOut值提供上下文,以确保MongoDB的网络利用率符合预期和应用程序使用。

network.tcpFastOpen

New in version 4.4.在版本4.4中新增

A document that reports data on MongoDB's support and use of TCP Fast Open (TFO) connections.报告MongoDB支持和使用TCP Fast Open(TFO)连接的数据的文档。

network.tcpFastOpen.kernelSetting

New in version 4.4.在版本4.4中新增

Linux only

Returns the value of /proc/sys/net/ipv4/tcp_fastopen:

  • 0 - TCP Fast Open is disabled on the system.系统上已禁用TCP Fast Open。
  • 1 - TCP Fast Open is enabled for outgoing connections.已为传出连接启用TCP快速打开。
  • 2 - TCP Fast Open is enabled for incoming connections.已为传入连接启用TCP快速打开。
  • 3 - TCP Fast Open is enabled for incoming and outgoing connections.TCP Fast Open已为传入和传出连接启用。
network.tcpFastOpen.serverSupported

New in version 4.4.在版本4.4中新增

  • Returns true if the host operating system supports inbound TCP Fast Open (TFO) connections.如果主机操作系统支持入站TCP快速开放(TFO)连接,则返回true
  • Returns false if the host operating system does not support inbound TCP Fast Open (TFO) connections.如果主机操作系统不支持入站TCP快速开放(TFO)连接,则返回false
network.tcpFastOpen.clientSupported

New in version 4.4.在版本4.4中新增

  • Returns true if the host operating system supports outbound TCP Fast Open (TFO) connections.如果主机操作系统支持出站TCP快速开放(TFO)连接,则返回true
  • Returns false if the host operating system does not support outbound TCP Fast Open (TFO) connections.如果主机操作系统不支持出站TCP快速开放(TFO)连接,则返回false
network.tcpFastOpen.accepted

New in version 4.4.在版本4.4中新增

The total number of accepted incoming TCP Fast Open (TFO) connections to the mongod or mongos since the mongod or mongos last started.mongodmongos上次启动以来,到mongod的已接受传入TCP快速开放(TFO)连接总数。

network.serviceExecutors

New in version 5.0.在版本5.0中新增

A document that reports data on the service executors, which run operations for client requests.报告服务执行器数据的文档,服务执行器为客户端请求运行操作。

network.serviceExecutors.passthrough

New in version 5.0.在版本5.0中新增

A document that reports data about the threads and clients for the passthrough service executor. 报告passthrough服务执行器的线程和客户端数据的文档。The passthrough service executor creates a new thread for each client and destroys the thread after the client ends.passthrough服务执行器为每个客户端创建一个新线程,并在客户端结束后销毁该线程。

network.serviceExecutors.passthrough.threadsRunning

New in version 5.0.在版本5.0中新增

Number of threads running in the passthrough service executor.passthrough服务执行器中运行的线程数。

network.serviceExecutors.passthrough.clientsInTotal

New in version 5.0.在版本5.0中新增

Total number of clients allocated to the passthrough service executor. 分配给passthrough服务执行器的客户端总数。A client can be allocated to the passthrough service executor and not currently running requests.可以将客户端分配给passthrough服务执行器,而当前不运行请求。

network.serviceExecutors.passthrough.clientsRunning

New in version 5.0.在版本5.0中新增

Number of clients currently using the passthrough service executor to run requests.当前使用passthrough服务执行器运行请求的客户端数。

network.serviceExecutors.passthrough.clientsWaitingForData

New in version 5.0.在版本5.0中新增

Number of clients using the passthrough service executor that are waiting for incoming data from the network.使用passthrough传递服务执行器等待来自网络的传入数据的客户端数。

network.serviceExecutors.fixed

New in version 5.0.在版本5.0中新增

A document that reports data about the threads and clients for the fixed service executor. 报告fixed服务执行器的线程和客户端数据的文档。The fixed service executor has a fixed number of threads. fixed服务执行器具有固定数量的线程。A thread is temporarily assigned to a client and the thread is preserved after the client ends.线程被临时分配给客户机,并且在客户机结束后该线程被保留。

network.serviceExecutors.fixed.threadsRunning

New in version 5.0.在版本5.0中新增

Number of threads running in the fixed service executor.fixed服务执行器中运行的线程数。

network.serviceExecutors.fixed.clientsInTotal

New in version 5.0.在版本5.0中新增

Total number of clients allocated to the fixed service executor. 分配给fixed服务执行器的客户端总数。A client can be allocated to the fixed service executor and not currently running requests.客户端可以分配给fixed服务执行器,而当前不运行请求。

network.serviceExecutors.fixed.clientsRunning

New in version 5.0.在版本5.0中新增

Number of clients currently using the fixed service executor to run requests.当前使用fixed服务执行器运行请求的客户端数。

network.serviceExecutors.fixed.clientsWaitingForData

New in version 5.0.在版本5.0中新增

Number of clients using the fixed service executor that are waiting for incoming data from the network.使用fixed服务执行器等待来自网络的传入数据的客户端数。

opLatencies

Only for mongod instances仅适用于mongod实例

"opLatencies" : {
   "reads" : <document>,
   "writes" : <document>,
   "commands" : <document>
},
opLatencies

A document containing operation latencies for the instance as a whole. 包含整个实例的操作延迟的文档。See latencyStats Document for an description of this document.有关此文档的说明,请参阅latencyStats文档

Only mongod instances report opLatencies.只有mongod实例报告opLatencies

opLatencies.reads

Latency statistics for read requests.读取请求的延迟统计信息。

opLatencies.writes

Latency statistics for write operations.写入操作的延迟统计信息。

opLatencies.commands

Latency statistics for database commands.数据库命令的延迟统计信息。

opReadConcernCounters

Warning警告
Removed已删除。

Starting in version 5.0, opReadConcernCounters is replaced by readConcernCounters.从5.0版开始,opReadConcernCountersreadConcernCounters取代。

Only for mongod instances仅适用于mongod实例

"opReadConcernCounters" : {
   "available" : NumberLong(<num>),
   "linearizable" : NumberLong(<num>),
   "local" : NumberLong(<num>),
   "majority" : NumberLong(<num>),
   "snapshot" : NumberLong(<num>),
   "none" :  NumberLong(<num>)
}
opReadConcernCounters

Removed in version 5.0. 在5.0版中删除。Replaced by readConcernCounters.替换为readConcernCounters

A document that reports on the read concern level specified by query operations to the mongod instance since it last started.mongod实例上次启动以来,向其报告查询操作指定的读取关注级别的文档。

Specified wDescription描述
"available"Number of query operations that specified read concern level "available". 指定读取问题级别"available"的查询操作数。
"linearizable"Number of query operations that specified read concern level "linearizable". 指定读取问题级别"linearizable"的查询操作数。
"local"Number of query operations that specified read concern level "local". 指定读取关注级别"local"的查询操作数。
"majority"Number of query operations that specified read concern level "majority". 指定读取关注级别"majority"的查询操作数。
"snapshot"Number of query operations that specified read concern level "snapshot". 指定读取问题级别"snapshot"的查询操作数。
"none"Number of query operations that did not specify a read concern level and instead used the default read concern level. 未指定读取关注级别而使用默认读取关注级别的查询操作数。

The sum of the opReadConcernCounters equals opcounters.query.opReadConcernCounters的和等于opcounters.query

opWriteConcernCounters

New in version 4.0.6.在版本4.0.6中新增

Only for mongod instances仅适用于mongod实例

"opWriteConcernCounters" : {
   "insert" : {
      "wmajority" : NumberLong(<num>),
      "wnum" : {
         "<num>" :  NumberLong(<num>),
         ...
      },
      "wtag" : {
         "<tag1>" :  NumberLong(<num>),
         ...
      },
      "none" : NumberLong(<num>)
   },
   "update" : {
      "wmajority" : NumberLong(<num>),
      "wnum" : {
         "<num>" :  NumberLong(<num>),
      },
      "wtag" : {
         "<tag1>" :  NumberLong(<num>),
         ...
      },
      "none" : NumberLong(<num>)
   },
   "delete" : {
      "wmajority" :  NumberLong(<num>)
      "wnum" : {
         "<num>" :  NumberLong(<num>),
         ...
      },
      "wtag" : {
         "<tag1>" :  NumberLong(<num>),
         ...
      },
      "none" : NumberLong(<num>)
   }
}
opWriteConcernCounters

A document that reports on the write concerns specified by write operations to the mongod instance since it last started.mongod实例上次启动以来,向其报告写操作指定的写关注点的文档。

More specifically, the opWriteConcernCounters reports on the w: <value> specified by the write operations. 更具体地说,opWriteConcernCounters报告写入操作指定的w: <value>The journal flag option (j) and the timeout option (wtimeout) of the write concerns does not affect the count. 写入问题的日志标志选项(j)和超时选项(wtimeout)不会影响计数。The count is incremented even if the operation times out.即使操作超时,计数也会递增。

Note注意

Only available when reportOpWriteConcernCountersInServerStatus parameter is set to true (false by default).仅当reportOpWriteConcernCountersInServerStatus参数设置为true(默认为false)时可用。

opWriteConcernCounters.insert

New in version 4.0.6.在版本4.0.6中新增

A document that reports on the w: <value> specified by insert operations to the mongod instance since it last started:一个文档,报告自上次启动以来对mongod实例执行插入操作所指定的w: <value>

Note注意

Only available when reportOpWriteConcernCountersInServerStatus parameter is set to true (false by default).仅当reportOpWriteConcernCountersInServerStatus参数设置为true(默认为false)时可用。

"insert" : {
   "wmajority" : NumberLong(<num>),
   "wnum" : {
      "<num>" :  NumberLong(<num>),
      ...
   },
   "wtag" : {
      "<tag1>" :  NumberLong(<num>),
      ...
   },
   "none" : NumberLong(<num>)
},
Specified wDescription描述
"wmajority"Number of insert operations that specified w: "majority". 指定w: "majority"的插入操作数。
"wnum"Number of insert operations that specified w: <num>. 指定w: <num>的插入操作数。The counts are grouped by the specific <num>. 计数按特定的<num>分组。
"wtag"Number of insert operations that specified w: <tag>. 指定w: <tag>的插入操作数。The counts are grouped by the specific <tag>.计数按特定的<tag>分组。
"none"Number of insert operations that did not specify w value. 未指定w值的插入操作数。These operations use the default w value of "majority". 这些操作使用默认w"majority"

The sum of the opWriteConcernCounters.insert equals opcounters.insert.opWriteConcernCounters.insert的和等于opcounters.insert

opWriteConcernCounters.update

New in version 4.0.6.在版本4.0.6中新增

A document that reports on the w: <value> specified by update operations to the mongod instance since it last started:自上次启动以来,向mongod实例报告更新操作指定的w: <value>的文档:

Note注意

Only available when reportOpWriteConcernCountersInServerStatus parameter is set to true (false by default).仅当reportOpWriteConcernCountersInServerStatus参数设置为true(默认为false)时可用。

"update" : {
   "wmajority" : NumberLong(<num>),
   "wnum" : {
      "<num>" :  NumberLong(<num>),
      ...
   },
   "wtag" : {
      "<tag1>" :  NumberLong(<num>),
      ...
   },
   "none" : NumberLong(<num>)
},
Specified 指定wDescription描述
"wmajority"Number of update operations that specified w: "majority". 指定w: "majority"的更新操作数。
"wnum"Number of update operations that specified w: <num>. 指定w: <num>的更新操作数。The counts are grouped by the specific <num>. 计数按特定的<num>分组。
"wtag"Number of update operations that specified w: <tag>. 指定w: <tag>的更新操作数。The counts are grouped by the specific <tag>. 计数按特定的<tag>分组。
"none"Number of update operations that did not specify w value. 未指定w值的更新操作数。These operations use the default w value of 1. 这些操作使用默认w1

The sum of the opWriteConcernCounters.update equals opcounters.update.opWriteConcernCounters.update的和等于opcounters.update

opWriteConcernCounters.delete

New in version 4.0.6.在版本4.0.6中新增

A document that reports on the w: <value> specified by delete operations to the mongod instance since it last started:mongod实例上次启动以来,向其报告由删除操作指定的w: <value>的文档:

Note注意

Only available when reportOpWriteConcernCountersInServerStatus parameter is set to true (false by default).仅当reportOpWriteConcernCountersInServerStatus参数设置为true(默认为false)时可用。

"delete" : {
   "wmajority" :  NumberLong(<num>),
   "wnum" : {
      "<num>" :  NumberLong(<num>),
      ...
   },
   "wtag" : {
      "<tag1>" :  NumberLong(<num>),
      ...
   },
   "none" : NumberLong(<num>)
}
Specified wDescription描述
"wmajority"Number of delete operations that specified w: "majority". 指定w: "majority"的删除操作数。
"wnum"Number of delete operations that specified w: <num>. 指定w: <num>的删除操作数。The counts are grouped by the specific <num>. 计数按特定的<num>分组。
"wtag"Number of delete operations that specified w: <tag>. 指定w: <tag>的删除操作数。The counts are grouped by the specific <tag>. 计数按特定的<tag>分组。
"none"Number of delete operations that did not specify w value. 未指定w值的删除操作数。These operations use the default w value of 1. 这些操作使用默认w1

The sum of the opWriteConcernCounters.delete equals opcounters.delete.opWriteConcernCounters.delete的和等于opcounters.delete

opcounters

Starting in MongoDB 4.2, the returned opcounters.* values are type NumberLong. 从MongoDB 4.2开始,返回的opccounter.*值为NumberLong类型。In previous versions, the values are of type NumberInt.在以前的版本中,值的类型为NumberInt。

"opcounters" : {
   "insert" : NumberLong(<num>),  // Starting in MongoDB 4.2, type is NumberLong
   "query" : NumberLong(<num>),   // Starting in MongoDB 4.2, type is NumberLong
   "update" : NumberLong(<num>),  // Starting in MongoDB 4.2, type is NumberLong
   "delete" : NumberLong(<num>),  // Starting in MongoDB 4.2, type is NumberLong
   "getmore" : NumberLong(<num>), // Starting in MongoDB 4.2, type is NumberLong
   "command" : NumberLong(<num>), // Starting in MongoDB 4.2, type is NumberLong
},
opcounters

A document that reports on database operations by type since the mongod instance last started.mongod实例上次启动以来,按类型报告数据库操作的文档。

These numbers will grow over time until next restart. 这些数字将随着时间的推移而增长,直到下次重启。Analyze these values over time to track database utilization.随时间分析这些值以跟踪数据库利用率。

Note注意

The data in opcounters treats operations that affect multiple documents, such as bulk insert or multi-update operations, as a single operation. opcounters中的数据将影响多个文档的操作(如批量插入或多更新操作)视为单个操作。See metrics.document for more granular document-level operation tracking.有关更详细的文档级操作跟踪,请参阅metrics.document

Additionally, these values reflect received operations, and increment even when operations are not successful.此外,这些值反映接收到的操作,即使操作不成功也会增加。

opcounters.insert

The total number of insert operations received since the mongod instance last started.mongod实例上次启动以来收到的插入操作总数。

Starting in MongoDB 4.2, the returned opcounters.* values are type NumberLong. 从MongoDB 4.2开始,返回的opccounter.*值为NumberLong类型。In previous versions, the values are of type NumberInt.在以前的版本中,值的类型为NumberInt。

opcounters.query

The total number of queries received since the mongod instance last started.mongod实例上次启动以来收到的查询总数。

Starting in MongoDB 4.2, the returned opcounters.* values are type NumberLong. 从MongoDB 4.2开始,返回的opccounter.*值为NumberLong类型。In previous versions, the values are of type NumberInt.在以前的版本中,值的类型为NumberInt。

opcounters.update

The total number of update operations received since the mongod instance last started.mongod实例上次启动以来收到的更新操作总数。

Starting in MongoDB 4.2, the returned opcounters.* values are type NumberLong. 从MongoDB 4.2开始,返回的opccounter.*值为NumberLong类型。In previous versions, the values are of type NumberInt.在以前的版本中,值的类型为NumberInt。

opcounters.delete

The total number of delete operations since the mongod instance last started.mongod实例上次启动以来的删除操作总数。

Starting in MongoDB 4.2, the returned opcounters.* values are type NumberLong. 从MongoDB 4.2开始,返回的opccounter.*值为NumberLong类型。In previous versions, the values are of type NumberInt.在以前的版本中,值的类型为NumberInt。

opcounters.getmore

The total number of getMore operations since the mongod instance last started. mongod实例上次启动以来,getMore操作的总数。This counter can be high even if the query count is low. 即使查询计数较低,此计数器也可能较高。Secondary nodes send getMore operations as part of the replication process.辅助节点在复制过程中发送getMore操作。

Starting in MongoDB 4.2, the returned opcounters.* values are type NumberLong. 从MongoDB 4.2开始,返回的opccounter.*值为NumberLong类型。In previous versions, the values are of type NumberInt.在以前的版本中,值的类型为NumberInt。

opcounters.command

The total number of commands issued to the database since the mongod instance last started.mongod实例上次启动以来,向数据库发出的命令总数。

opcounters.command counts all commands except the write commands: insert, update, and delete.opcounters.command统计除写入命令外的所有命令:insertupdatedelete

Starting in MongoDB 4.2, the returned opcounters.* values are type NumberLong. 从MongoDB 4.2开始,返回的opccounter.*值为NumberLong类型。In previous versions, the values are of type NumberInt.在以前的版本中,值的类型为NumberInt。

opcounters.deprecated

This section only appears in the db.serverStatus() output when one of the following, deprecated opcodes has been used:仅当使用了以下不推荐使用的操作码之一时,db.serverStatus()输出中才会出现此部分:

"deprecated": {
   "opQuery": NumberLong(<num>),
   "opGetMore": NumberLong(<num>),
   "opKillCursors": NumberLong(<num>),
   "opDelete": NumberLong(<num>),
   "opUpdate": NumberLong(<num>),
   "opInsert": NumberLong(<num>),
   "total": NumberLong(<num>),
}

These opcodes were deprecated in MongoDB 5.0 and support for these opcodes is removed in MongoDB 5.1. MongoDB 5.0中已弃用这些操作码,MongoDB 5.1中已删除对这些操作码的支持。Starting in MongoDB 5.1, mongod refuses requests that use a deprecated opcode and increments the corresponding counter.从MongoDB 5.1开始,mongod拒绝使用不推荐使用的操作码的请求,并增加相应的计数器。

OP_QUERY is an exception to the general rule. 是一般规则的例外。mongod continues to support hello and isMaster requests that use OP_QUERY. mongod继续支持使用OP_QUERYhelloisMaster请求。mongod refuses any other OP_QUERY requests.mongod拒绝任何其他OP_QUERY请求。

The counters are reset when mongod starts.mongod启动时计数器复位。

opcountersRepl

Starting in MongoDB 4.2, the returned opcountersRepl.* values are type NumberLong. 从MongoDB 4.2开始,返回的opccountersRepl.*值为NumberLong类型。In previous versions, the values are type NumberInt.在以前的版本中,值的类型为NumberInt。

"opcountersRepl" : {
   "insert" : NumberLong(<num>),  // Starting in MongoDB 4.2, type is NumberLong
   "query" : NumberLong(<num>),   // Starting in MongoDB 4.2, type is NumberLong
   "update" : NumberLong(<num>),  // Starting in MongoDB 4.2, type is NumberLong
   "delete" : NumberLong(<num>),  // Starting in MongoDB 4.2, type is NumberLong
   "getmore" : NumberLong(<num>), // Starting in MongoDB 4.2, type is NumberLong
   "command" : NumberLong(<num>), // Starting in MongoDB 4.2, type is NumberLong
},
opcountersRepl

A document that reports on database replication operations by type since the mongod instance last started.mongod实例上次启动以来,按类型报告数据库复制操作的文档。

These values only appear when the current host is a member of a replica set.只有当当前主机是副本集的成员时,才会显示这些值。

These values will differ from the opcounters values because of how MongoDB serializes operations during replication. 由于MongoDB在复制期间如何序列化操作,这些值将与操作计数器值不同。See Replication for more information on replication.有关复制的详细信息,请参阅复制

These numbers will grow over time in response to database use until next restart. 这些数字将随着时间的推移而增长,以响应数据库的使用,直到下次重新启动。Analyze these values over time to track database utilization.随时间分析这些值以跟踪数据库利用率。

Starting in MongoDB 4.2, the returned opcountersRepl.* values are type NumberLong. 从MongoDB 4.2开始,返回的opccountersRepl.*值为NumberLong类型。In previous versions, the values are type NumberInt.在以前的版本中,值的类型为NumberInt。

opcountersRepl.insert

The total number of replicated insert operations since the mongod instance last started.mongod实例上次启动以来复制的插入操作总数。

Starting in MongoDB 4.2, the returned opcountersRepl.* values are type NumberLong. 从MongoDB 4.2开始,返回的opccountersRepl.*值为NumberLong类型。In previous versions, the values are type NumberInt.在以前的版本中,值的类型为NumberInt。

opcountersRepl.query

The total number of replicated queries since the mongod instance last started.mongod实例上次启动以来复制的查询总数。

Starting in MongoDB 4.2, the returned opcountersRepl.* values are type NumberLong. 从MongoDB 4.2开始,返回的opccountersRepl.*值为NumberLong类型。In previous versions, the values are type NumberInt.在以前的版本中,值的类型为NumberInt。

opcountersRepl.update

The total number of replicated update operations since the mongod instance last started.mongod实例上次启动以来复制的更新操作总数。

Starting in MongoDB 4.2, the returned opcountersRepl.* values are type NumberLong. 从MongoDB 4.2开始,返回的opccountersRepl.*值为NumberLong类型。In previous versions, the values are type NumberInt.在以前的版本中,值的类型为NumberInt。

opcountersRepl.delete

The total number of replicated delete operations since the mongod instance last started.mongod实例上次启动以来复制的删除操作总数。

Starting in MongoDB 4.2, the returned opcountersRepl.* values are type NumberLong. 从MongoDB 4.2开始,返回的opccountersRepl.*值为NumberLong类型。In previous versions, the values are type NumberInt.在以前的版本中,值的类型为NumberInt。

opcountersRepl.getmore

The total number of getMore operations since the mongod instance last started. mongod实例上次启动以来,getMore操作的总数。This counter can be high even if the query count is low. 即使查询计数较低,此计数器也可能较高。Secondary nodes send getMore operations as part of the replication process.辅助节点在复制过程中发送getMore操作。

Starting in MongoDB 4.2, the returned opcountersRepl.* values are type NumberLong. 从MongoDB 4.2开始,返回的opccountersRepl.*值为NumberLong类型。In previous versions, the values are type NumberInt.在以前的版本中,值的类型为NumberInt。

opcountersRepl.command

The total number of replicated commands issued to the database since the mongod instance last started.mongod实例上次启动以来,向数据库发出的复制命令总数。

Starting in MongoDB 4.2, the returned opcountersRepl.* values are type NumberLong. In previous versions, the values are type NumberInt.从MongoDB 4.2开始,返回的opccountersRepl.*值为NumberLong类型。在以前的版本中,值的类型为NumberInt。

readConcernCounters

New in version 5.0.在版本5.0中新增

"readConcernCounters" : {
   "nonTransactionOps" : {
      "none" : NumberLong(<num>),
      "local" : NumberLong(<num>),
      "available" : NumberLong(<num>),
      "majority" : NumberLong(<num>),
      "snapshot" : {
         "withClusterTime" : NumberLong(<num>),
         "withoutClusterTime" : NumberLong(<num>)
      },
      "linearizable" : NumberLong(<num>)
   },
   "transactionOps" : {
      "none" : NumberLong(<num>),
      "local" : NumberLong(<num>),
      "majority" : NumberLong(<num>),
      "snapshot" : {
         "withClusterTime" : NumberLong(<num>),
         "withoutClusterTime" : NumberLong(<num>)
      }
   }
},
readConcernCounters

A document that reports on the read concern level specified by query operations. 报告由查询操作指定的读取问题级别的文档。This document contains the readConcernCounters.nonTransactionOps and readConcernCounters.transactionOps documents.本文档包含readConcernCounters.nonTransactionOpsreadConcernCounters.transactionOps文档。

readConcernCounters.nonTransactionOps

A document that reports on the read concern level specified by non-transaction query operations performed after the database server last started.报告数据库服务器上次启动后执行的非事务查询操作所指定的读取问题级别的文档。

readConcernCounters.nonTransactionOps.none

Number of non-transaction query operations that did not specify a read concern level and instead used the default read concern level.未指定读取关注级别而使用默认读取关注级别的非事务查询操作数。

readConcernCounters.nonTransactionOps.local

Number of non-transaction query operations that specified the "local" read concern level.指定"local"读取关注级别的非事务查询操作数。

readConcernCounters.nonTransactionOps.available

Number of non-transaction query operations that specified the "available" read concern level.指定"available"读取问题级别的非事务查询操作数。

readConcernCounters.nonTransactionOps.majority

Number of non-transaction query operations that specified the "majority" read concern level.指定"majority"读取关注级别的非事务查询操作数。

readConcernCounters.nonTransactionOps.snapshot

Document containing non-transaction query operations that specified the "snapshot" read concern level.包含指定"snapshot"读取关注级别的非事务查询操作的文档。

readConcernCounters.nonTransactionOps.snapshot.withClusterTime

Number of non-transaction query operations that specified the "snapshot" read concern level and the cluster time, which specified a point in time.指定"snapshot"读取问题级别和群集时间(指定时间点)的非事务查询操作数。

readConcernCounters.nonTransactionOps.snapshot.withoutClusterTime

Number of non-transaction query operations that specified the "snapshot" read concern level without the cluster time, which means a point in time was omitted and the server will read the most recently committed snapshot available to the node.指定了"snapshot"读取关注级别而没有群集时间的非事务查询操作数,这意味着忽略了某个时间点,服务器将读取节点可用的最近提交的快照。

readConcernCounters.nonTransactionOps.linearizable

Number of non-transaction query operations that specified the "linearizable" read concern level.指定"linearizable"读取问题级别的非事务查询操作数。

readConcernCounters.transactionOps

A document that reports on the read concern level specified by transaction query operations performed after the database server last started.报告数据库服务器上次启动后执行的事务查询操作所指定的读取问题级别的文档。

readConcernCounters.transactionOps.none

Number of transaction query operations that did not specify a read concern level and instead used the default read concern level.未指定读取关注级别而使用默认读取关注级别的事务查询操作数。

readConcernCounters.transactionOps.local

Number of transaction query operations that specified the "local" read concern level.指定"local"读取关注级别的事务查询操作数。

readConcernCounters.transactionOps.available

Number of transaction query operations that specified the "available" read concern level.指定"available"读取问题级别的事务查询操作数。

readConcernCounters.transactionOps.majority

Number of transaction query operations that specified the "majority" read concern level.指定"majority"读取关注级别的事务查询操作数。

readConcernCounters.transactionOps.snapshot

Document containing transaction query operations that specified the "snapshot" read concern level.包含指定"snapshot"读取问题级别的事务查询操作的文档。

readConcernCounters.transactionOps.snapshot.withClusterTime

Number of transaction query operations that specified the "snapshot" read concern level and the cluster time, which specified a point in time.指定"snapshot"读取问题级别和群集时间(指定时间点)的事务查询操作数。

readConcernCounters.transactionOps.snapshot.withoutClusterTime

Number of transaction query operations that specified the "snapshot" read concern level without the cluster time, which means a point in time was omitted and the server will read the most recently committed snapshot available to the node.指定了"snapshot"读取关注级别而没有群集时间的事务查询操作数,这意味着忽略了某个时间点,服务器将读取节点可用的最近提交的快照。

oplogTruncation

"oplogTruncation" : {
   "totalTimeProcessingMicros" : NumberLong(<num>),
   "processingMethod" : <string>,
   "oplogMinRetentionHours" : <double>
   "totalTimeTruncatingMicros" : NumberLong(<num>),
   "truncateCount" : NumberLong(<num>)
},
oplogTruncation

A document that reports on oplog truncations.报告oplog截断的文档。

The field only appears when the current instance is a member of a replica set and uses either the WiredTiger Storage Engine or In-Memory Storage Engine.仅当当前实例是副本集的成员并且使用WiredTiger存储引擎内存存储引擎时,才会显示该字段。

Changed in version 4.4.在版本4.4中更改

Also available in In-Memory Storage Engine.也可在内存存储引擎中获得。

New in version 4.2.1.在版本4.2.1中新增 Available in the WiredTiger Storage Engine.WiredTiger存储引擎中提供。

oplogTruncation.totalTimeProcessingMicros

The total time taken, in microseconds, to scan or sample the oplog to determine the oplog truncation points.扫描或采样oplog以确定oplog截断点所用的总时间(以微秒为单位)。

totalTimeProcessingMicros is only meaningful if the mongod instance started on existing data files (i.e. not meaningful for In-Memory Storage Engine).totalTimeProcessingMicros只有在mongod实例在现有数据文件上启动时才有意义(即对内存存储引擎没有意义)。

See oplogTruncation.processingMethod

Changed in version 4.4.在版本4.4中更改

Also available in In-Memory Storage Engine.也可在内存存储引擎中获得。

New in version 4.2.1.在版本4.2.1中新增 Available in the WiredTiger Storage Engine.WiredTiger存储引擎中提供。

oplogTruncation.processingMethod

The method used at start up to determine the oplog truncation points. 启动时用于确定oplog截断点的方法。The value can be either "sampling" or "scanning".该值可以是"sampling""scanning"

processingMethod is only meaningful if the mongod instance started on existing data files (i.e. not meaningful for In-Memory Storage Engine).processingMethod只有在mongod实例在现有数据文件上启动时才有意义(即对内存存储引擎没有意义)。

Changed in version 4.4.在版本4.4中更改

Also available in In-Memory Storage Engine.也可在内存存储引擎中获得。

New in version 4.2.1.在版本4.2.1中新增 Available in the WiredTiger Storage Engine.WiredTiger存储引擎中提供。

oplogTruncation.minRetentionHours

New in version 4.4.在版本4.4中新增 The minimum retention period for the oplog in hours. oplog的最小保留期(小时)。If the oplog has exceeded the oplog size, the mongod only truncates oplog entries older than the configured retention value.如果oplog超过了oplog大小,mongod只会截断比配置的保留值早的oplog条目。

Only visible if the mongod is a member of a replica set and:仅当mongod是副本集的成员并且:

oplogTruncation.totalTimeTruncatingMicros

The cumulative time spent, in microseconds, performing oplog truncations.执行oplog截断所花费的累计时间(以微秒为单位)。

Changed in version 4.4.在版本4.4中更改

Also available in In-Memory Storage Engine.也可在内存存储引擎中获得。

New in version 4.2.1.在版本4.2.1中新增 Available in the WiredTiger Storage Engine.WiredTiger存储引擎中提供。

oplogTruncation.truncateCount

The cumulative number of oplog truncations.oplog截断的累积次数。

Changed in version 4.4.在版本4.4中更改

Also available in In-Memory Storage Engine.也可在内存存储引擎中获得。

New in version 4.2.1.在版本4.2.1中新增 Available in the WiredTiger Storage Engine.WiredTiger存储引擎中提供。

repl

"repl" : {
   "hosts" : [
         <string>,
         <string>,
         <string>
   ],
   "setName" : <string>,
   "setVersion" : <num>,
   "isWritablePrimary" : <boolean>,
   "secondary" : <boolean>,
   "primary" : <hostname>,
   "me" : <hostname>,
   "electionId" : ObjectId(""),
   "primaryOnlyServices": {
      "ReshardingRecipientService": { "state": <string>, "numInstances": <num> },
      "RenameCollectionParticipantService": { "state": <string>, "numInstances": <num> },
      "ShardingDDLCoordinator": { "state": <string>, "numInstances": <num> },
      "ReshardingDonorService": { "state": <string>, "numInstances": <num> }
   },
   "rbid" : <num>,
   "replicationProgress" : [
         {
            "rid" : <ObjectId>,
            "optime" : { ts: <timestamp>, term: <num> },
            "host" : <hostname>,
            "memberId" : <num>
         },
        ...
   ]
}
repl

A document that reports on the replica set configuration. 报告副本集配置的文档。repl only appear when the current host is a replica set. repl仅在当前主机是副本集时出现。See Replication for more information on replication.

repl.hosts

An array of the current replica set members' hostname and port information ("host:port").当前副本集成员的主机名和端口信息的数组("host:port")。

repl.setName

A string with the name of the current replica set. 包含当前副本集名称的字符串。This value reflects the --replSet command line argument, or replSetName value in the configuration file.此值反映配置文件中的--replSet命令行参数或replSetName值。

repl.isWritablePrimary

A boolean that indicates whether the current node is the primary of the replica set.一个布尔值,指示当前节点是否是副本集的primary

repl.secondary

A boolean that indicates whether the current node is a secondary member of the replica set.一个布尔值,指示当前节点是否是副本集的secondary成员。

repl.primary

The hostname and port information ("host:port") of the current primary member of the replica set.副本集当前primary成员的主机名和端口信息("host:port")。

repl.me

The hostname and port information ("host:port") for the current member of the replica set.副本集当前成员的主机名和端口信息("host:port")。

repl.primaryOnlyServices

Document that contains the number and status of instances of each primary service active on the server. 包含服务器上每个活动主服务实例的数量和状态的文档。Primary services can only start when a server is primary but can continue running to completion after the server changes state.主服务只能在服务器是主服务器时启动,但在服务器更改状态后可以继续运行直至完成。

New in version 5.0.在版本5.0中新增

repl.primaryOnlyServices.ReshardingRecipientService

Document that contains the state and number of instances of the ReshardingRecipientService.包含ReshardingRecipientService的状态和实例数的文档。

Recipients are the shards,that would own the chunks after as a result of the resharding operation, according to the new shard key and zones.接收方是分片,根据新的分片键区域,在重新分配操作之后,它们将拥有分片。

The resharding coordinator instructs each donor and recipient shard primary, to rename the temporary sharded collection. 重新分配协调器指示每个捐赠者和接收者分片主对象重命名临时分片集合。The temporary collection becomes the new resharded collection.临时集合将成为新的重新保护集合。

New in version 5.0.在版本5.0中新增

repl.primaryOnlyServices.RenameCollectionParticipantService

Document that contains the state and number of instances of the RenameCollectionParticipantService.包含RenameCollectionParticipantService的状态和实例数的文档。

The RenameCollectionParticipantService ensures that, after a shard receives a renameCollection request, the shard is able to resume the local rename in case of system failure.RenameCollectionParticipantService确保在分片收到renameCollection请求后,分片能够在系统故障时恢复本地重命名。

New in version 5.0.在版本5.0中新增

repl.primaryOnlyServices.ShardingDDLCoordinator

Document that contains the state and number of instances of the ShardingDDLCoordinator.包含ShardingDDLCoordinator的状态和实例数的文档。

The ShardingDDLCoordinator service manages DDL operations for primary databases such as: create database, drop database, renameCollection.ShardingDDLCoordinator服务管理primary数据库的DDL操作,例如:创建数据库删除数据库重命名集合

The ShardingDDLCoordinator ensures that one DDL operation for each database can happen at any one specific point in time within a sharded cluster.ShardingDDLCoordinator确保每个数据库的一个DDL操作可以在分片集群内的任何一个特定时间点发生。

New in version 5.0.在版本5.0中新增

repl.primaryOnlyServices.ReshardingDonorService

Document that contains the state and number of instances of the ReshardingDonorService.包含ReshardingDonorService的状态和实例数的文档。

Donors are the shards that own chunks of the sharded collection before the rename operation completes.施主是在重命名操作完成之前拥有分片集合块的分片。

The resharding coordinator instructs each donor and recipient shard primary, to rename the temporary sharded collection. 重新分配协调器指示每个捐赠者和接收者分片主对象重命名临时分片集合。The temporary collection becomes the new resharded collection.临时集合将成为新的重新保护集合。

New in version 5.0.在版本5.0中新增

repl.rbid

Rollback identifier. 回滚标识符。Used to determine if a rollback has happened for this mongod instance.用于确定此mongod实例是否发生了回滚。

repl.replicationProgress

An array with one document for each member of the replica set that reports replication process to this member. 一个数组,副本集的每个成员都有一个文档,用于向该成员报告复制过程。Typically this is the primary, or secondaries if using chained replication.通常,如果使用链式复制,则这是主副本或辅助副本。

To include this output, you must pass the repl option to the serverStatus, as in the following:要包含此输出,必须将repl选项传递给serverStatus,如下所示:

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

The content of the repl.replicationProgress section depends on the source of each member's replication. repl.replicationProgress部分的内容取决于每个成员的复制源。This section supports 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 replica set. 用作副本集成员ID的ObjectId。For internal use only.仅供内部使用。

repl.replicationProgress[n].optime

Information regarding the last operation from the oplog that the member applied, as reported from this member.此成员报告的成员应用的oplog中最后一次操作的相关信息。

repl.replicationProgress[n].host

The name of the host in [hostname]:[port] format for the member of the replica set.副本集成员的主机名,格式为[hostname]:[port]

repl.replicationProgress[n].memberID

The integer identifier for this member of the replica set.副本集此成员的整数标识符。

security安全

"security" : {
   "authentication" : {
      "saslSupportedMechsReceived" : <num>,
      "mechanisms" : {
         "MONGODB-X509" : {
            "speculativeAuthenticate" : {
               "received" : NumberLong(<num>),
               "successful" : NumberLong(<num>)
            },
            "authenticate" : {
               "received" : NumberLong(<num>),
               "successful" : NumberLong(<num>)
            }
         },
         "SCRAM-SHA-1" : {
            "speculativeAuthenticate" : {
               "received" : NumberLong(<num>),
               "successful" : NumberLong(<num>)
            },
            "authenticate" : {
               "received" : NumberLong(<num>),
               "successful" : NumberLong(<num>)
            }
         },
         "SCRAM-SHA-256" : {
            "speculativeAuthenticate" : {
               "received" : NumberLong(<num>),
               "successful" : NumberLong(<num>)
            },
            "authenticate" : {
               "received" : NumberLong(<num>),
               "successful" : NumberLong(<num>)
            }
          }
       }
     },
     "SSLServerSubjectName": <string>,
     "SSLServerHasCertificateAuthority": <boolean>,
     "SSLServerCertificateExpirationDate": <date>
},
security

A document that reports on:报告以下内容的文档:

  • The number of times a given authentication mechanism has been used to authenticate against the mongod or mongos instance. (New in MongoDB 4.4)使用给定身份验证机制对mongodmongos实例进行身份验证的次数。(MongoDB 4.4新增)
  • The mongod/mongos instance's TLS/SSL certificate. mongod/mongos实例的TLS/SSL证书。(Only appears for mongod or mongos instance with support for TLS)(仅适用于支持TLS的mongodmongos实例)
security.authentication.saslSupportedMechsReceived

New in version 5.0.在版本5.0中新增

The number of times a hello request includes a valid hello.saslSupportedMechs field.hello请求包含有效hello.saslSupportedMechs字段的次数。

security.authentication.mechanisms

A document that reports on the number of times a given authentication mechanism has been used to authenticate against the mongod or mongos instance. 报告给定身份验证机制用于对mongodmongos实例进行身份验证的次数的文档。The values in the document distinguish standard authentication and speculative authentication. 文档中的值区分标准身份验证和推测身份验证。[1]

New in version 4.4.在版本4.4中新增

Note注意

The fields in the mechanisms document depend on the configuration of the authenticationMechanisms parameter. mechanisms文档中的字段取决于authenticationMechanisms参数的配置。The mechanisms document includes a field for each authentication mechanism supported by your mongod or mongos instance.机制文档包含mongodmongos实例支持的每个身份验证机制的字段。

The following example shows the shape of the mechanisms document for a deployment that only supports x.509 authentication.以下示例显示了仅支持x.509身份验证的部署的mechanisms文档的形状。

security.authentication.mechanisms.MONGODB-X509

A document that reports on the number of times x.509 has been used to authenticate against the mongod or mongos instance.一个报告x.509被用于对mongodmongos实例进行身份验证次数的文档。

Includes total number of x.509 authentication attempts and the subset of those attempts which were speculative. 包括x.509身份验证尝试的总数以及那些推测性尝试的子集。[1]

New in version 4.4.在版本4.4中新增

security.authentication.mechanisms.MONGODB-X509.speculativeAuthenticate.received

Number of speculative authentication attempts received using x.509. 使用x.509接收的推测身份验证尝试数。Includes both successful and failed speculative authentication attempts.包括成功和失败的推测身份验证尝试。 [1]

New in version 4.4.在版本4.4中新增

security.authentication.mechanisms.MONGODB-X509.speculativeAuthenticate.successful

Number of successful speculative authentication attempts received using x.509. 使用x.509接收的成功推测身份验证尝试数。[1]

New in version 4.4.在版本4.4中新增

security.authentication.mechanisms.MONGODB-X509.authenticate.received

Number of successful and failed authentication attempts received using x.509. 使用x.509接收的成功和失败的身份验证尝试数。This value includes speculative authentication attempts received using x.509.此值包括使用x.509接收的推测性身份验证尝试。

New in version 4.4.在版本4.4中新增

security.authentication.mechanisms.MONGODB-X509.authenticate.successful

Number of successful authentication attempts received using x.509. 使用x.509接收的成功身份验证尝试数。This value includes successful speculative authentication attempts which used x.509.此值包括使用x.509的成功推测身份验证尝试。

New in version 4.4.在版本4.4中新增

[1](1, 2, 3, 4) Speculative authentication minimizes the number of network round trips during the authentication process to optimize performance.推测性身份验证可在身份验证过程中最小化网络往返次数,以优化性能。
security.SSLServerSubjectName

The subject name associated with the mongod/mongos instance's TLS/SSL certificate.mongod/mongos实例的TLS/SSL证书关联的主题名称。

security.SSLServerHasCertificateAuthority

A boolean that is:布尔值为:

  • true when the mongod/mongos instance's TLS/SSL certificate is associated with a certificate authority.mongod/mongos实例的TLS/SSL证书与证书颁发机构关联时,为true
  • false when the TLS/SSL certificate is self-signed.如果TLS/SSL证书是自签名的,则为false
security.SSLServerCertificateExpirationDate

The expiration date and time of the mongod/mongos instance's TLS/SSL certificate.mongod/mongos实例的TLS/SSL证书的到期日期和时间。

sharding

When run on mongos, the command returns sharding information.当在mongos上运行时,该命令返回分片信息。

Changed in version 3.6.在版本3.6中更改

Starting in MongoDB 3.6, shard members return sharding information.从MongoDB 3.6开始,分片成员返回分片信息。

{
   "configsvrConnectionString" : "csRS/cfg1.example.net:27019,cfg2.example.net:27019,cfg2.example.net:27019",
   "lastSeenConfigServerOpTime" : {
      "ts" : <timestamp>,
      "t" : NumberLong(<num>)
   },
   "maxChunkSizeInBytes" : NumberLong(<num>)
}
sharding

A document with data regarding the sharded cluster. 包含有关分片集群的数据的文档。The lastSeenConfigServerOpTime is present only for a mongos or a shard member, not for a config server.lastSeenConfigServerOpTime仅适用于mongos或shard成员,而不适用于配置服务器。

sharding.configsvrConnectionString

The connection string for the config servers.配置服务器的连接字符串。

sharding.lastSeenConfigServerOpTime

The latest optime of the CSRS primary that the mongos or the shard member has seen. The optime document includes:mongos或shard成员所看到的CSRS主要的最新优化。optime文档包括:

  • ts, the Timestamp of the operation.
  • t, the term in which the operation was originally generated on the primary.

The lastSeenConfigServerOpTime is present only if the sharded cluster uses CSRS.只有当分片集群使用CSRS时,lastSeenConfigServerOpTime才会出现。

sharding.maxChunkSizeInBytes

The maximum size limit for a chunk. 块的最大大小限制If the chunk size has been updated recently on the config server, the maxChunkSizeInBytes may not reflect the most recent value.如果最近在配置服务器上更新了块大小,则maxChunkSizeInBytes可能不会反映最新的值。

shardingStatistics

New in version 4.0.在版本4.0中新增

When run on a member of a shard:在分片的成员上运行时:

"shardingStatistics" : {
   "countStaleConfigErrors" : NumberLong(<num>),
   "countDonorMoveChunkStarted" : NumberLong(<num>),
   "totalDonorChunkCloneTimeMillis" : NumberLong(<num>),
   "totalCriticalSectionCommitTimeMillis" : NumberLong(<num>),
   "totalCriticalSectionTimeMillis" : NumberLong(<num>),
   "countDocsClonedOnRecipient" : NumberLong(<num>),
   "countDocsClonedOnDonor" : NumberLong(<num>),
   "countRecipientMoveChunkStarted" : NumberLong(<num>),
   "countDocsDeletedOnDonor" : NumberLong(<num>),
   "countDonorMoveChunkLockTimeout" : NumberLong(<num>),
   "unfinishedMigrationFromPreviousPrimary" : NumberLong(<num>),
   "catalogCache" : {
      "numDatabaseEntries" : NumberLong(<num>),
      "numCollectionEntries" : NumberLong(<num>),
      "countStaleConfigErrors" : NumberLong(<num>),
      "totalRefreshWaitTimeMicros" : NumberLong(<num>),
      "numActiveIncrementalRefreshes" : NumberLong(<num>),
      "countIncrementalRefreshesStarted" : NumberLong(<num>),
      "numActiveFullRefreshes" : NumberLong(<num>),
      "countFullRefreshesStarted" : NumberLong(<num>),
      "countFailedRefreshes" : NumberLong(<num>)
   },
   "rangeDeleterTasks" : <num>,
   "resharding" : {
      "countReshardingOperations" : NumberLong(<num>),
      "countReshardingSuccessful" : NumberLong(<num>),
      "countReshardingFailures" : NumberLong(<num>),
      "countReshardingCanceled" : NumberLong(<num>),
      "totalOperationTimeElapsedMillis" : NumberLong(<num>),
      "remainingOperationTimeEstimatedMillis" : NumberLong(<num>),
      "approxDocumentsToCopy" : NumberLong(<num>),
      "documentsCopied" : NumberLong(<num>),
      "approxBytesToCopy" : NumberLong(<num>),
      "bytesCopied" : NumberLong(<num>),
      "totalCopyTimeElapsedMillis" : NumberLong(<num>),
      "oplogEntriesFetched" : NumberLong(<num>),
      "oplogEntriesApplied" : NumberLong(<num>),
      "totalApplyTimeElapsedMillis" : NumberLong(<num>),
      "countWritesDuringCriticalSection" : NumberLong(<num>),
      "totalCriticalSectionTimeElapsedMillis" : NumberLong(<num>),
      "donorState" : <num>,
      "recipientState" : <num>,
      "coordinatorState" : <num>,
      "opStatus" : <num>,
      "lastOpEndingChunkImbalance": NumberLong(<num>)
   }
},

When run on a mongos:mongos上运行时:

"shardingStatistics" : {
   "numHostsTargeted": {
      "find" : {
         "allShards": NumberLong(<num>),
         "manyShards": NumberLong(<num>),
         "oneShard": NumberLong(<num>),
         "unsharded": NumberLong(<num>)
               },
      "insert": {
         "allShards": NumberLong(<num>),
         "manyShards": NumberLong(<num>),
         "oneShard": NumberLong(<num>),
         "unsharded": NumberLong(<num>)
               },
      "update": {
         "allShards": NumberLong(<num>),
         "manyShards": NumberLong(<num>),
         "oneShard": NumberLong(<num>),
         "unsharded": NumberLong(<num>)
               },
      "delete": {
         "allShards": NumberLong(<num>),
         "manyShards": NumberLong(<num>),
         "oneShard": NumberLong(<num>),
         "unsharded": NumberLong(<num>)
               },
      "aggregate": {
         "allShards": NumberLong(<num>),
         "manyShards": NumberLong(<num>),
         "oneShard": NumberLong(<num>),
         "unsharded": NumberLong(<num>)
               }
      }
   },
   "catalogCache" : {
      "numDatabaseEntries" : NumberLong(<num>),
      "numCollectionEntries" : NumberLong(<num>),
      "countStaleConfigErrors" : NumberLong(<num>),
      "totalRefreshWaitTimeMicros" : NumberLong(<num>),
      "numActiveIncrementalRefreshes" : NumberLong(<num>),
      "countIncrementalRefreshesStarted" : NumberLong(<num>),
      "numActiveFullRefreshes" : NumberLong(<num>),
      "countFullRefreshesStarted" : NumberLong(<num>),
      "countFailedRefreshes" : NumberLong(<num>),
      "operationsBlockedByRefresh" : {
        "countAllOperations" : NumberLong(<num>),
        "countInserts" : NumberLong(<num>),
        "countQueries" : NumberLong(<num>),
        "countUpdates" : NumberLong(<num>),
        "countDeletes" : NumberLong(<num>),
        "countCommands" : NumberLong(<num>)
      }
   }
},
shardingStatistics

A document which contains metrics on metadata refresh on sharded clusters.包含分片集群元数据刷新指标的文档。

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 metadata refreshes.由于过时的配置异常会触发元数据的刷新,因此这个数字与元数据刷新的次数大致成正比。

Only present when run on a shard.仅在分片上运行时出现。

shardingStatistics.countDonorMoveChunkStarted

The total number of times that the moveChunk command has started on the shard, of which this node is a member, as part of a chunk migration process. 作为块迁移过程的一部分,moveChunk命令在该节点所属的分片上启动的总次数。This increasing number does not consider whether the chunk migrations succeed or not.这个不断增加的数字并不考虑区块迁移是否成功。

Only present when run on a shard.仅在分片上运行时出现。

shardingStatistics.totalDonorChunkCloneTimeMillis

The cumulative time, in milliseconds, taken by the clone phase of the chunk migrations from this shard, of which this node is a member. 从该分片(该节点是该分片的成员)进行区块迁移的克隆阶段所用的累积时间(以毫秒为单位)。Specifically, for each migration from this shard, the tracked time starts with the moveChunk command and ends before the destination shard enters a catch-up phase to apply changes that occurred during the chunk migrations.具体来说,对于从该分片进行的每次迁移,跟踪时间从moveChunk命令开始,在目标分片进入追赶阶段以应用块迁移期间发生的更改之前结束。

Only present when run on a shard.

shardingStatistics.totalCriticalSectionCommitTimeMillis

The cumulative time, in milliseconds, taken by the update metadata phase of the chunk migrations from this shard, of which this node is a member. 从该分片(该节点是该分片的成员)迁移块的更新元数据阶段所用的累积时间(以毫秒为单位)。During the update metadata phase, all operations on the collection are blocked.在更新元数据阶段,集合上的所有操作都被阻止。

Only present when run on a shard.仅在分片上运行时出现。

shardingStatistics.totalCriticalSectionTimeMillis

The cumulative time, in milliseconds, taken by the catch-up phase and the update metadata phase of the chunk migrations from this shard, of which this node is a member.从该分片(该节点是该分片的成员)迁移块的追赶阶段和更新元数据阶段所用的累积时间(以毫秒为单位)。

To calculate the duration of the catch-up phase, subtract totalCriticalSectionCommitTimeMillis from totalCriticalSectionTimeMillis:要计算追赶阶段的持续时间,请从totalCriticalSectionTimeMillis中减去totalCriticalSectionCommitTimeMillis

totalCriticalSectionTimeMillis - totalCriticalSectionCommitTimeMillis

Only present when run on a shard.仅在分片上运行时出现。

shardingStatistics.countDocsClonedOnRecipient

Cumulative, always-increasing count of documents that have been cloned on this member where it acted as the primary of the recipient shard.在该成员作为接收方分片的主要成员的位置上,已克隆的文档的累积计数始终在增加。

Only present when run on a shard.仅在分片上运行时出现。

New in version 4.2.在版本4.2中新增

shardingStatistics.countDocsClonedOnDonor

Cumulative, always-increasing count of documents that haves been cloned on this member where it acted as the primary of the donor shard.累积的,总是不断增加的文档在这个成员上被克隆的数量,它作为供体分片的主要部分。

Only present when run on a shard.仅在分片上运行时出现。

New in version 4.2.在版本4.2中新增

shardingStatistics.countRecipientMoveChunkStarted

Cumulative, always-increasing count of chunks this member, acting as the primary of the recipient shard, has started to receive (whether the move has succeeded or not).该成员作为接收方分片的主要成员,已开始接收的块的数量(无论移动是否成功)是累积的,总是递增的。

Only present when run on a shard.

New in version 4.2.在版本4.2中新增

shardingStatistics.countDocsDeletedOnDonor

Cumulative, always-increasing count of documents that have been deleted on this member during chunk migration where the member acted as the primary of the donor shard.在区块迁移过程中,该成员作为施主分片的主要成员,因此该成员上已删除的文档数量一直在增加。

Only present when run on a shard.仅在分片上运行时出现。

New in version 4.2.在版本4.2中新增

shardingStatistics.countDonorMoveChunkLockTimeout

Cumulative, always-increasing count of chunk migrations that were aborted due to lock acquisition timeouts, where the member acted as the primary of the donor shard.由于锁获取超时而中止的块迁移的累积计数始终在增加,其中成员充当施主分片的主要成员。

Only present when run on a shard.

New in version 4.2.在版本4.2中新增

shardingStatistics.unfinishedMigrationFromPreviousPrimary

The number of unfinished migrations left by the previous primary after an election. 选举后前一次初选留下的未完成移民数量。This value is only updated after the newly-elected mongod completes the transition to primary.该值仅在新当选的mongod完成向主节点的转换后更新。

Only present when run on a shard.仅在分片上运行时出现。

New in version 4.4.在版本4.4中新增

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 the catalog cache.当前在目录缓存中的数据库条目总数。

shardingStatistics.catalogCache.numCollectionEntries

The total number of collection entries (across all databases) that are currently in the catalog cache.当前在目录缓存中的集合项总数(跨所有数据库)。

shardingStatistics.catalogCache.countStaleConfigErrors

The total number of times that threads hit stale config exception. 线程遇到过时配置异常的总次数。A stale config exception triggers a refresh of the metadata.过时的配置异常会触发元数据的刷新。

shardingStatistics.catalogCache.totalRefreshWaitTimeMicros

The cumulative time, in microseconds, that threads had to wait for a refresh of the metadata.线程必须等待元数据刷新的累积时间(以微秒为单位)。

shardingStatistics.catalogCache.numActiveIncrementalRefreshes

The number of incremental catalog cache refreshes that are currently waiting 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 currently waiting 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.失败的完整或增量刷新的累积次数。

shardingStatistics.rangeDeleterTasks

The current total of the queued chunk range deletion tasks that are ready to run or are running as part of the chunk migration process.已准备好运行或作为块迁移过程的一部分正在运行的队列块范围删除任务的当前总数。

Inspect the documents in the config.rangeDeletions collection for information about the chunk ranges pending deletion from a shard after a chunk migration.检查config.rangeDeletions集合中的文档,以获取有关块迁移后从分片中删除的块范围的信息。

Only present when run on a shard member.仅在分片成员上运行时出现。

New in version 4.4.在版本4.4中新增

shardingStatistics.catalogCache.operationsBlockedByRefresh

A document with statistics about operations blocked by catalog cache refresh activity on a mongos.包含mongos上目录缓存刷新活动阻止的操作统计信息的文档。

Only present when run on a mongos.

New in version 4.2.7.在版本4.2.7中新增

shardingStatistics.catalogCache.operationsBlockedByRefresh.countAllOperations

The cumulative number of all operations ran on a mongos that were blocked at any point in their lifetime by a refresh of the catalog cache. mongos上运行的所有操作的累积数量,这些操作在其生命周期内的任何时间点都被目录缓存的刷新所阻止。This counter is the aggregate sum of all other operationsBlockedByRefresh metrics tracked below.此计数器是下面跟踪的所有其他操作operationsBlockedByRefresh度量的总和。

Only present when run on a mongos.只有在mongos上运行时才出现。

New in version 4.2.7.在版本4.2.7中新增

shardingStatistics.catalogCache.operationsBlockedByRefresh.countInserts

The cumulative number of insert operations ran on a mongos that were blocked at any point in their lifetime by a refresh of the catalog cache.在mongo上运行的插入操作的累积数量,这些操作在其生命周期内的任何时间点都被目录缓存的刷新所阻止。

Only present when run on a mongos.只有在mongos上运行时才出现。

New in version 4.2.7.在版本4.2.7中新增

shardingStatistics.catalogCache.operationsBlockedByRefresh.countQueries

The cumulative number of query operations ran on a mongos that were blocked at any point in their lifetime by a refresh of the catalog cache.mongos上运行的查询操作的累积数量,这些操作在其生命周期的任何时间点都被目录缓存的刷新所阻止。

Only present when run on a mongos.只有在mongos上运行时才出现。

New in version 4.2.7.在版本4.2.7中新增

shardingStatistics.catalogCache.operationsBlockedByRefresh.countUpdates

The cumulative number of update operations ran on a mongos that were blocked at any point in their lifetime by a refresh of the catalog cache.mongos上运行的更新操作的累积数量,这些操作在其生命周期的任何时间点都被目录缓存的刷新所阻止。

Only present when run on a mongos.只有在mongos上运行时才出现。

New in version 4.2.7.在版本4.2.7中新增

shardingStatistics.catalogCache.operationsBlockedByRefresh.countDeletes

The cumulative number of delete operations ran on a mongos that were blocked at any point in their lifetime by a refresh of the catalog cache.mongos上运行的删除操作的累积数量,这些操作在其生命周期的任何时间点都被目录缓存的刷新所阻止。

Only present when run on a mongos.只有在mongos上运行时才出现。

New in version 4.2.7.在版本4.2.7中新增

shardingStatistics.catalogCache.operationsBlockedByRefresh.countCommands

The cumulative number of command operations ran on a mongos that were blocked at any point in their lifetime by a refresh of the catalog cache.mongos上运行的命令操作的累积数量,这些操作在其生命周期的任何时间点都被目录缓存的刷新所阻止。

Only present when run on a mongos.只有在mongos上运行时才出现。

New in version 4.2.7.在版本4.2.7中新增

shardingStatistics.resharding

A document with statistics about resharding operations.包含有关重新分片操作的统计信息的文档。

Each shard returns its own resharding operation statistics. 每个分片都返回自己的重新排序操作统计信息。If a shard is not involved in a resharding operation, then that shard will not contain statistics about the resharding operation.如果一个分片不参与重新分配操作,那么该分片将不包含有关重新分配操作的统计信息。

Only present when run on a shard or config server.仅在shard或config服务器上运行时出现。

New in version 5.0.在版本5.0中新增

shardingStatistics.resharding.countReshardingOperations

The sum of countReshardingSuccessful, countReshardingFailures, and countReshardingCanceled. countReshardingSuccessfulcountReshardingFailurescountReshardingCanceled的总和。The sum is further incremented by 1 if a resharding operation has started but has not yet completed. 如果重新分片操作已开始但尚未完成,则该总和将进一步增加1Sum is set to 0 when mongod is started or restarted.mongod启动或重新启动时,Sum设置为0。

Only present when run on a shard or config server.仅在shard或config服务器上运行时出现。

New in version 5.0.在版本5.0中新增

shardingStatistics.resharding.countReshardingSuccessful

Number of successful resharding operations. 成功的重新分片操作数。Number is set to 0 when mongod is started or restarted.mongod启动或重新启动时,数字设置为0。

Only present when run on a shard or config server.只有在mongos上运行时才出现。

New in version 5.0.在版本5.0中新增

shardingStatistics.resharding.countReshardingFailures

Number of failed resharding operations. 失败的重新分片操作数。Number is set to 0 when mongod is started or restarted.mongod启动或重新启动时,数字设置为0。

Only present when run on a shard or config server.只有在mongos上运行时才出现。

New in version 5.0.在版本5.0中新增

shardingStatistics.resharding.countReshardingCanceled

Number of canceled resharding operations. 取消的重新分片操作数Number is set to 0 when mongod is started or restarted.mongod启动或重新启动时,数字设置为0。

Only present when run on a shard or config server.只有在mongos上运行时才出现。

New in version 5.0.在版本5.0中新增

shardingStatistics.resharding.totalOperationTimeElapsedMillis

Total elapsed time, in milliseconds, for the current resharding operation. 当前重新分片操作的总运行时间(以毫秒为单位)。Time is set to 0 when a new resharding operation starts.新的重新发货操作开始时,时间设置为0。

Only present when run on a shard or config server. 仅在shard或config服务器上运行时出现。Returns 0 on a config server.在配置服务器上返回0。

New in version 5.0.在版本5.0中新增

shardingStatistics.resharding.remainingOperationTimeEstimatedMillis

Estimated remaining time, in milliseconds, for the current resharding operation. 当前重新装载操作的估计剩余时间(毫秒)。Time is set to 0 when a new resharding operation starts.新的重新分片操作开始时,时间设置为0。

Only present when run on a shard or config server. 仅在shard或config服务器上运行时出现。Returns 0 on a config server.在配置服务器上返回0。

New in version 5.0.在版本5.0中新增

shardingStatistics.resharding.approxDocumentsToCopy

Approximate number of documents to copy from donor shards to recipient shards for the current resharding operation. 当前重新分版操作中要从供体分片复制到接收方分片的文档的大致数量。Number is an estimate that is set when the resharding operation starts and the number is not updated as the operation progresses. 数字是重新发货操作开始时设置的估计值,并且随着操作的进行,数字不会更新。Number is set to 0 when a new resharding operation starts.新的重新发货操作开始时,编号设置为0。

Only present when run on a shard or config server. 仅在shard或config服务器上运行时出现。Returns 0 on a config server.在配置服务器上返回0。

New in version 5.0.在版本5.0中新增

shardingStatistics.resharding.documentsCopied

Number of documents copied from donor shards to recipient shards for the current resharding operation. 为当前重新分片操作从供体分片复制到接收方分片的文档数。Number is set to 0 when a new resharding operation starts.新的重新发货操作开始时,编号设置为0。

Only present when run on a shard or config server. 仅在shard或config服务器上运行时出现。Returns 0 on a config server.在配置服务器上返回0。

New in version 5.0.在版本5.0中新增

shardingStatistics.resharding.approxBytesToCopy

Approximate number of bytes to copy from donor shards to recipient shards for the current resharding operation. 对于当前重新分片操作,要从施主分片复制到接收方分片的大约字节数。Number is an estimate that is set when the resharding operation starts and the number is not updated as the operation progresses. 数字是重新发货操作开始时设置的估计值,并且随着操作的进行,数字不会更新。Number is set to 0 when a new resharding operation starts.新的重新发货操作开始时,编号设置为0。

Only present when run on a shard or config server. 仅在shard或config服务器上运行时出现。Returns 0 on a config server.在配置服务器上返回0。

New in version 5.0.在版本5.0中新增

shardingStatistics.resharding.bytesCopied

Number of bytes copied from donor shards to recipient shards for the current resharding operation. 当前重新分版操作从施主分片复制到接收方分片的字节数。Number is set to 0 when a new resharding operation starts.新的重新发货操作开始时,编号设置为0。

Only present when run on a shard or config server. 仅在shard或config服务器上运行时出现。Returns 0 on a config server.在配置服务器上返回0。

New in version 5.0.在版本5.0中新增

shardingStatistics.resharding.totalCopyTimeElapsedMillis

Total elapsed time, in milliseconds, for ongoing data copy tasks from donor shards to recipient shards for the current resharding operation. 当前重新分版操作中,从施主分片到接收方分片的持续数据复制任务的总运行时间(以毫秒为单位)。Time is set to 0 when a new resharding operation starts.新的重新发货操作开始时,时间设置为0。

Only present when run on a shard or config server. 仅在shard或config服务器上运行时出现。Returns 0 on a config server.在配置服务器上返回0。

New in version 5.0.在版本5.0中新增

shardingStatistics.resharding.oplogEntriesFetched

Number of entries fetched from the oplog for the current resharding operation. oplog中为当前重新分片操作提取的条目数。Number is set to 0 when a new resharding operation starts.新的重新发货操作开始时,编号设置为0。

Only present when run on a shard or config server. 仅在shard或config服务器上运行时出现。Returns 0 on a config server.在配置服务器上返回0。

shardingStatistics.resharding.oplogEntriesApplied

Number of entries applied to the oplog for the current resharding operation. 应用于当前重新包装操作的oplog的条目数。Number is set to 0 when a new resharding operation starts.新的重新发货操作开始时,编号设置为0。

Only present when run on a shard or config server. 仅在shard或config服务器上运行时出现。Returns 0 on a config server.在配置服务器上返回0。

New in version 5.0.在版本5.0中新增

shardingStatistics.resharding.totalApplyTimeElapsedMillis

Total elapsed time, in milliseconds, for the apply step of the current resharding operation. 当前重新分片操作的应用步骤的总运行时间(以毫秒为单位)。In the apply step, recipient shards modify their data based on new incoming writes from donor shards. 在应用步骤中,接收方分片根据来自施主分片的新传入写入修改其数据。Time is set to 0 when a new resharding operation starts.新的重新发货操作开始时,时间设置为0。

Only present when run on a shard or config server. 仅在shard或config服务器上运行时出现。Returns 0 on a config server.在配置服务器上返回0。

New in version 5.0.在版本5.0中新增

shardingStatistics.resharding.countWritesDuringCriticalSection

Number of writes perfomed in the critical section for the current resharding operation. 当前重新分版操作的关键部分中执行的写入次数。The critical section prevents new incoming writes to the collection currently being resharded. 关键部分阻止对当前正在重新保护的集合进行新的传入写入。Number is set to 0 when a new resharding operation starts.新的重新发货操作开始时,编号设置为0。

Only present when run on a shard or config server. 仅在shard或config服务器上运行时出现。Returns 0 on a config server.在配置服务器上返回0。

New in version 5.0.在版本5.0中新增

shardingStatistics.resharding.totalCriticalSectionTimeElapsedMillis

Total elapsed time, in milliseconds, for the critical section of the current resharding operation. 当前重新分片操作的关键部分的总运行时间(以毫秒为单位)。The critical section prevents new incoming writes to the collection currently being resharded. 关键部分阻止对当前正在重新保护的集合进行新的传入写入。Time is set to 0 when a new resharding operation starts.新的重新发货操作开始时,时间设置为0。

Only present when run on a shard or config server. 仅在shard或config服务器上运行时出现。Returns 0 on a config server.在配置服务器上返回0。

New in version 5.0.在版本5.0中新增

shardingStatistics.resharding.donorState

State of the donor shard for the current resharding operation. 当前重新分版操作的施主分片的状态。Number is set to 0 when a new resharding operation starts.新的重新发货操作开始时,编号设置为0。

Number Returned返回的编号Meaning意思Description描述
0unusedThe shard is not a donor in the current resharding operation.分片在当前重新分发操作中不是施主。
1preparing-to-donateThe donor shard is preparing to donate data to the recipient shards. 捐赠者分片正在准备向接收者分片捐赠数据。
2donating-initial-dataThe donor shard is donating data to the recipient shards.捐赠者分片正在向接收者分片捐赠数据。
3donating-oplog-entriesThe donor shard is donating oplog entries to the recipient shards. 施主分片将oplog条目捐赠给接收者分片。
4preparing-to-block-writesThe donor shard is about to prevent new incoming write operations to the collection that is being resharded. 施主分片将阻止对正在重新保护的集合进行新的传入写入操作。
5errorAn error occurred during the resharding operation.重新发送操作期间出错。
6blocking-writesThe donor shard is preventing new incoming write operations and the donor shard has notified all recipient shards that new incoming writes are prevented. 施主分片正在阻止新的传入写入操作,并且施主分片已通知所有接收方分片阻止了新的传入写操作。
7doneThe donor shard has dropped the old sharded collection and the resharding operation is complete. 施主分片已丢弃旧分片集合,重新分配操作已完成。

Only present when run on a shard or config server. 仅在shard或config服务器上运行时出现。Returns 0 on a config server.在配置服务器上返回0。

New in version 5.0.在版本5.0中新增

shardingStatistics.resharding.recipientState

State of the recipient shard for the current resharding operation. 当前重新分版操作的接收方分片的状态。Number is set to 0 when a new resharding operation starts.新的重新发货操作开始时,编号设置为0。

Number Returned返回的编号Meaning意思Description描述
0unusedShard is not a recipient in the current resharding operation.分片不是当前重新分发操作中的收件人。
1awaiting-fetch-timestampThe recipient shard is waiting for the donor shards to be prepared to donate their data 接收者分片正在等待捐赠者分片准备好捐赠他们的数据
2creating-collectionThe recipient shard is creating the new sharded collection.接收方分片正在创建新的分片集合。
3cloningThe recipient shard is receiving data from the donor shards.接收方分片正在从施主分片接收数据。
4applyingThe recipient shard is applying oplog entries to modify its copy of the data based on the new incoming writes from donor shards. 接收方分片正在应用oplog条目,以根据来自施主分片的新传入写入修改其数据副本。
5errorAn error occurred during the resharding operation.重新发送操作期间出错。
6strict-consistencyThe recipient shard has all data changes stored in a temporary collection. 接收方分片将所有数据更改存储在临时集合中。
7doneThe resharding operation is complete.重新装载操作已完成。

Only present when run on a shard or config server. 仅在shard或config服务器上运行时出现。Returns 0 on a config server.在配置服务器上返回0。

New in version 5.0.在版本5.0中新增

shardingStatistics.numHostsTargeted

Indicates the number of shards targeted for CRUD operations and aggregation commands. 指示CRUD操作和聚合命令的目标分片数。When a CRUD operation or aggregation command is run, the following metrics will be incremented.运行CRUD操作或聚合命令时,以下指标将递增。

Name名称Description描述
allShardsA command targeted all shards一个针对所有分片的命令
manyShardsA command targeted more than one shard针对多个分片的命令
oneShardA command targeted one shard一个命令针对一个分片
unshardedA command was run on an unsharded collection对未分级集合运行了命令
Note注意

Running the serverStatus command on mongos will provide insight into the CRUD and aggregation operations that run on a sharded cluster.mongos上运行serverStatus命令将深入了解在分片化集群上运行的CRUD和聚合操作。

Multi-shard operations can either be scatter-gather or shard specific. 多分片操作可以是分散聚集或分片特定的。Multi-shard scatter-gather operations can consume more resources. 多分片分散聚集操作可能会消耗更多资源By using the shardingStatistics.numHostsTargeted metrics you can tune the aggregation queries that run on a sharded cluster.通过使用shardingStatistics.numHostsTargeted度量,您可以调整在分片集群上运行的聚合查询。

shardingStatistics.resharding.coordinatorState

State of the resharding coordinator for the current resharding operation. 当前重新分片操作的重新发货协调员的状态。The resharding coordinator is a thread that runs on the config server primary. 重新分片协调器是在配置服务器主服务器上运行的线程。Number is set to 0 when a new resharding operation starts.新的重新发货操作开始时,编号设置为0。

Number Returned返回的编号Meaning意思Description描述
0unusedThe shard is not the coordinator in the current resharding operation. 分片不是当前重新分配操作中的协调器。
1initializingThe resharding coordinator has inserted the coordinator document into config.reshardingOperations and has added the reshardingFields to the config.collections entry for the original collection.重新分配协调员已将协调员文档插入到config.reshardingOperations中,并已将reshardingFields添加到原始集合的config.collections条目中。
2preparing-to-donate

The resharding coordinator重新发货协调员

  • has created a config.collections entry for the temporary resharding collection.已为临时重新分配集合创建了config.collections条目。
  • has inserted entries into config.chunks for ranges based on the new shard key.已将条目插入到基于新分片键的范围的config.chunks中。
  • has inserted entries into config.tags for any zones associated with the new shard key.已将条目插入到与新分片键关联的任何区域的config.tags中。

The coordinator informs participant shards to begin the resharding operation. 协调器通知参与者分片开始重新分配操作。The coordinator then waits until all donor shards have picked a minFetchTimestamp and are ready to donate.然后,协调器等待,直到所有捐赠者分片都选择了minFetchTimestamp并准备好捐赠。

3cloningThe resharding coordinator informs donor shards to donate data to recipient shards. 重新分配协调器通知捐赠者分片将数据捐赠给接收者分片。The coordinator waits for all recipients to finish cloning the data from the donor. 协调器等待所有收件人完成从供体克隆数据。
4applyingThe resharding coordinator informs recipient shards to modify their copies of data based on new incoming writes from donor shards. 重新分配协调器通知接收者分片根据来自捐赠者分片的新写入来修改其数据副本。The coordinator waits for all recipients to finish applying oplog entries. 协调器等待所有收件人完成应用oplog条目。
5blocking-writesThe resharding coordinator informs donor shards to prevent new incoming write operations to the collection being resharded. 重新分配协调器通知施主分片,以防止对正在重新分配的集合进行新的传入写入操作。The coordinator then waits for all recipients to have all data changes. 然后,协调器等待所有收件人进行所有数据更改。
6abortingAn unrecoverable error occurred during the resharding operation or the abortReshardCollection command (or the sh.abortReshardCollection() method) was run. 重新分配操作或运行abortReshardCollection命令(或sh.abortReshardCollection()方法)时发生不可恢复的错误。
6committingThe resharding coordinator removes the config.collections entry for the temporary resharding collection. 重新分配协调器删除临时重新分配集合的config.collections条目。The coordinator then adds the recipientFields to the source collection's entry. 然后,协调器将recipientFields添加到源集合的条目中。

Only present when run on a shard or config server.仅在shard或config服务器上运行时出现。

New in version 5.0.在版本5.0中新增

shardingStatistics.resharding.opStatus

Status for the current resharding operation.当前重新分片操作的状态。

Number Returned返回的编号Description描述
-1Resharding operation not in progress.重新分片操作未进行。
0Resharding operation succeeded.重新分片操作成功。
1Resharding operation failed.重新分片操作失败。
2Resharding operation canceled.重新分片操作已取消。

Only present when run on a shard or config server.

New in version 5.0.在版本5.0中新增

shardingStatistics.resharding.lastOpEndingChunkImbalance

This field contains the highest numeric difference for (maxNumChunksInShard - minNumChunksInShard) among all zones for the collection that was processed by the most recent resharding operation.此字段包含由最近重新分片操作处理的集合的所有区域中(maxNumChunksInShard - minNumChunksInShard)的最大数值差异。

See Chunk Size.请参见块大小

Only updated on config servers.仅在配置服务器上更新。

New in version 5.0.在版本5.0中新增

shardedIndexConsistency

"shardedIndexConsistency" : {
   "numShardedCollectionsWithInconsistentIndexes" : NumberLong(<num>)
},
shardedIndexConsistency

Available only on config server instances.仅在配置服务器实例上可用。

A document that returns results of index consistency checks for sharded collections.返回分片集合索引一致性检查结果的文档。

The returned metrics are meaningful only when run on the primary of the config server replica set for a version 4.4+ (and 4.2.6+) sharded cluster.只有在4.4+(和4.2.6+)版本分片化集群的配置服务器副本集的主副本上运行时,返回的度量才有意义。

Tip提示
See also: 参阅:

New in version 4.4. (and 4.2.6)

shardedIndexConsistency.numShardedCollectionsWithInconsistentIndexes

Available only on config server instances.仅在配置服务器实例上可用。

Number of sharded collections whose indexes are inconsistent across the shards. 索引在分片中不一致的分片集合数。A sharded collection has an inconsistent index if the collection does not have the exact same indexes (including the index options) on each shard that contains chunks for the collection.如果分片集合在包含集合块的每个分片上没有完全相同的索引(包括索引选项),则分片集合具有不一致的索引。

To investigate if a sharded collection has inconsistent indexes, see Find Inconsistent Indexes across Shards.若要调查分片化集合是否具有不一致的索引,请参阅查找分片中的不一致索引

The returned metrics are meaningful only when run on the primary of the config server replica set for a version 4.4+ (and 4.2.6+) sharded cluster.只有在4.4+(和4.2.6+)版本分片化集群的配置服务器副本集的主副本上运行时,返回的度量才有意义。

Tip提示
See also: 参阅:

New in version 4.4. (and 4.2.6)

storageEngine

"storageEngine" : {
   "name" : <string>,
   "supportsCommittedReads" : <boolean>,
   "persistent" : <boolean>
},
storageEngine

A document with data about the current storage engine.包含当前存储引擎数据的文档。

storageEngine.name

The name of the current storage engine.当前存储引擎的名称。

storageEngine.supportsCommittedReads

A boolean that indicates whether the storage engine supports "majority" read concern.一个布尔值,指示存储引擎是否支持"majority" 读取关注

storageEngine.persistent

A boolean that indicates whether the storage engine does or does not persist data to disk.一个布尔值,指示存储引擎是否将数据持久化到磁盘。

transactions事务

"transactions" : {
   "retriedCommandsCount" : NumberLong(<num>),
   "retriedStatementsCount" : NumberLong(<num>),
   "transactionsCollectionWriteCount" : NumberLong(<num>),
   "currentActive" : NumberLong(<num>),
   "currentInactive" : NumberLong(<num>),
   "currentOpen" : NumberLong(<num>),
   "totalAborted" : NumberLong(<num>),
   "totalCommitted" : NumberLong(<num>),
   "totalStarted" : NumberLong(<num>),
   "totalPrepared" : NumberLong(<num>),
   "totalPreparedThenCommitted" : NumberLong(<num>),
   "totalPreparedThenAborted" :  NumberLong(<num>),
   "currentPrepared" :  NumberLong(<num>),
   "lastCommittedTransaction" : <document> // Starting in 4.2.2 (and 4.0.9)
},

New in version 4.2.

"transactions" : {
   "currentOpen" : NumberLong(<num>),     // Starting in 4.2.1
   "currentActive" : NumberLong(<num>),   // Starting in 4.2.1
   "currentInactive" : NumberLong(<num>), // Starting in 4.2.1
   "totalStarted" : NumberLong(<num>),
   "totalCommitted" : NumberLong(<num>),
   "totalAborted" : NumberLong(<num>),
   "abortCause" : {
      <String1> : NumberLong(<num>),
      <String2>" : NumberLong(<num>),
      ...
   },
   " totalContactedParticipants" : NumberLong(<num>),
   " totalParticipantsAtCommit" : NumberLong(<num>),
   " totalRequestsTargeted" : NumberLong(<num>),
   " commitTypes" : {
      " noShards" : {
         " initiated" : NumberLong(<num>),
         " successful" : NumberLong(<num>),
         " successfulDurationMicros" : NumberLong(<num>)
      },
      " singleShard" : {
         " initiated" : NumberLong(<num>),
         " successful" : NumberLong(<num>),
         " successfulDurationMicros" : NumberLong(<num>)
      },
      " singleWriteShard" : {
         " initiated" : NumberLong(<num>),
         " successful" : NumberLong(<num>),
         " successfulDurationMicros" : NumberLong(<num>)
      },
      " readOnly" : {
         " initiated" : NumberLong(<num>),
         " successful" : NumberLong(<num>),
         " successfulDurationMicros" : NumberLong(<num>)
      },
      " twoPhaseCommit" : {
         " initiated" : NumberLong(<num>),
         " successful" : NumberLong(<num>),
         " successfulDurationMicros" : NumberLong(<num>)
      },
      " recoverWithToken" : {
         " initiated" : NumberLong(<num>),
         " successful" : NumberLong(<num>),
         " successfulDurationMicros" : NumberLong(<num>)
      }
   }
},
transactions

Available on mongod in 3.6.3+ and on mongos in 4.2+.在3.6.3+版本的mongod和4.2+版本的mongo上提供。

When run on a mongod, a document with data about the retryable writes and transactions.mongod上运行时,包含可重试写入事务数据的文档。

When run on a mongos, a document with data about the transactions run on the instance.当在mongos上运行时,包含事务数据的文档在实例上运行。

transactions.retriedCommandsCount

Available on mongod only.仅在mongod上可用。

The total number of retry attempts that have been received after the corresponding retryable write command has already been committed. 已提交相应的可重试写入命令后收到的重试尝试总数。That is, a retryable write is attempted even though the write has previously succeeded and has an associated record for the transaction and session in the config.transactions collection, such as when the initial write response to the client is lost.也就是说,即使写入之前已成功,并且在config.transactions集合中具有事务和会话的关联记录,例如当对客户端的初始写入响应丢失时,也会尝试可重试的写入。

Note注意

MongoDB does not re-execute the committed writes.MongoDB不会重新执行提交的写入。

The total is across all sessions.所有会话的总数。

The total does not include any retryable writes that may happen internally as part of a chunk migration.总数不包括作为块迁移的一部分可能在内部发生的任何可重试写入。

transactions.retriedStatementsCount

Available on mongod only.仅在mongod上可用。

The total number of write statements associated with the retried commands in transactions.retriedCommandsCount.transactions.retriedCommandsCount中重试的命令关联的写入语句总数。

Note注意

MongoDB does not re-execute the committed writes.MongoDB不会重新执行提交的写入。

The total does not include any retryable writes that may happen internally as part of a chunk migration.总数不包括作为块迁移的一部分可能在内部发生的任何可重试写入。

transactions.transactionsCollectionWriteCount

Available on mongod only.仅在mongod上可用。

The total number of writes to the config.transactions collection, triggered when a new retryable write statement is committed.提交新的可重试写入语句时触发的对config.transactions集合的写入总数。

For update and delete commands, since only single document operations are retryable, there is one write per statement.对于update和delete命令,由于只能重试单个文档操作,因此每个语句只有一次写入。

For insert operations, there is one write per batch of documents inserted, except when a failure leads to each document being inserted separately.对于插入操作,每插入一批文档就有一次写入,除非失败导致每个文档被单独插入。

The total includes writes to a server's config.transactions collection that occur as part of a migration.总数包括作为迁移的一部分发生的对服务器的config.transactions集合的写入。

transactions.currentActive

Available on mongod in 4.0.2+ and mongos in 4.2.1+mongod 4.0.2+和mongos 4.2.1中提供+

The total number of open transactions currently executing a command.当前执行命令的打开事务总数。

transactions.currentInactive

Available on mongod in 4.0.2+ and mongos in 4.2.1+mongod 4.0.2+和mongos 4.2.1中提供+

The total number of open transactions that are not currently executing a command.当前未执行命令的打开事务的总数。

transactions.currentOpen

Available on mongod in 4.0.2+ and mongos in 4.2.1+mongod 4.0.2+和mongos 4.2.1中提供+

The total number of open transactions. 未结事务的总数。A transaction is opened when the first command is run as a part of that transaction, and stays open until the transaction either commits or aborts.当第一个命令作为事务的一部分运行时,事务被打开,并保持打开状态,直到事务提交或中止。

transactions.totalAborted

Available on mongod in 4.0.2+ and mongos in 4.2+.mongod 4.0.2+版本和mongos 4.2+版本中提供。

For the mongod, the total number of transactions aborted on this instance since its last startup.对于mongod,此实例自上次启动以来中止的事务总数。

For the mongos, the total number of transactions aborted through this instance since its last startup.对于mongos,自上次启动以来通过该实例中止的事务总数。

transactions.totalCommitted

Available on mongod in 4.0.2+ and mongos in 4.2+.mongod 4.0.2+版本和mongos 4.2+版本中提供。

For the mongod, the total number of transactions committed on the instance since its last startup.对于mongod,是自上次启动以来在实例上提交的事务总数。

For the mongos,the total number of transactions committed through this instance since its last startup.对于mongos,自上次启动以来通过该实例提交的事务总数。

transactions.totalStarted

Available on mongod in 4.0.2+ and mongos in 4.2+.mongod 4.0.2+版本和mongos 4.2+版本中提供。

For the mongod, the total number of transactions started on this instance since its last startup.对于mongod,此实例自上次启动以来启动的事务总数。

For the mongos, the total number of transactions started on this instance since its last startup.对于mongos,自上次启动以来,在该实例上启动的事务总数。

transactions.abortCause

Available on mongos only.仅在mongos上可用。

Breakdown of the transactions.totalAborted by cause. transactions.totalAborted按原因中止。If a client issues an explicit abortTransaction, the cause is listed as abort.如果客户端发出明确的abortTransaction,则原因列为abort

For example:例如:

"totalAborted" : NumberLong(5),
"abortCause" : {
   "abort" : NumberLong(1),
   "DuplicateKey" : NumberLong(1),
   "StaleConfig" : NumberLong(3),
   "SnapshotTooOld" : NumberLong(1)
},

New in version 4.2.在版本4.2中新增

transactions.totalContactedParticipants

Available on mongos only.仅在mongos上可用。

The total number of shards contacted for all transactions started through this mongos since its last startup.自上次启动以来,通过此mongos启动的所有事务所接触的分片总数。

The number of shards contacted during the transaction processes can include those shards that may not be included as part of the commit.在事务处理过程中接触的分片数量可以包括那些可能不包含在提交中的分片。

New in version 4.2.在版本4.2中新增

transactions.totalParticipantsAtCommit

Available on mongos only.仅在mongos上可用。

Total number of shards involved in the commit for all transactions started through this mongos since its last startup.自上次启动以来,通过此mongos启动的所有事务的提交所涉及的分片总数。

New in version 4.2.在版本4.2中新增

transactions.totalRequestsTargeted

Available on mongos only.仅在mongos上可用。

Total number of network requests targeted by the mongos as part of its transactions.mongos作为其事务的一部分所针对的网络请求总数。

New in version 4.2.在版本4.2中新增

transactions.commitTypes

Available on mongos only.仅在mongos上可用。

Breakdown of the commits by types. 按类型细分提交。For example:例如:

"noShards" : {
   "initiated" : NumberLong(0),
   "successful" : NumberLong(0),
   "successfulDurationMicros" : NumberLong(0)
},
"singleShard" : {
   "initiated" : NumberLong(5),
   "successful" : NumberLong(5),
   "successfulDurationMicros" : NumberLong(203118)
},
"singleWriteShard" : {
   "initiated" : NumberLong(0),
   "successful" : NumberLong(0),
   "successfulDurationMicros" : NumberLong(0)
},
"readOnly" : {
   "initiated" : NumberLong(0),
   "successful" : NumberLong(0),
   "successfulDurationMicros" : NumberLong(0)
},
"twoPhaseCommit" : {
   "initiated" : NumberLong(1),
   "successful" : NumberLong(1),
   "successfulDurationMicros" : NumberLong(179616)
},
"recoverWithToken" : {
   "initiated" : NumberLong(0),
   "successful" : NumberLong(0),
   "successfulDurationMicros" : NumberLong(0)
}

The types of commit are:提交的类型包括:

Type类型Description描述
noShardsCommits of transactions that did not contact any shards.未接触任何分片的事务提交。
singleShardCommits of transactions that affected a single shard.影响单个分片的事务提交。
singleWriteShardCommits of transactions that contacted multiple shards but whose write operations only affected a single shard. 接触多个分片但其写入操作仅影响单个分片的事务提交。
readOnlyCommits of transactions that only involved read operations.仅涉及读取操作的事务的提交。
twoPhaseCommitCommits of transactions that included writes to multiple shards 提交包括写入多个分片的事务
recoverWithTokenCommits that recovered the outcome of transactions from another instance or after this instance was restarted. 从另一个实例或此实例重新启动后恢复事务结果的提交。

For each commit type, the command returns the following metrics:对于每种提交类型,该命令返回以下度量:

MetricsDescription描述
initiatedTotal number of times that commits of this type were initiated. 启动此类型提交的总次数。
successfulTotal number of times that commits of this type succeeded.成功提交此类型的总次数。
successfulDurationMicrosTotal time, in microseconds, taken by successful commits of this type. 成功提交此类型所用的总时间(以微秒为单位)。

New in version 4.2.在版本4.2中新增

transactions.totalPrepared

Available on mongod only.仅在mongod上可用。

The total number of transactions in prepared state on this server since the mongod process's last startup.mongod进程上次启动以来,此服务器上处于准备状态的事务总数。

New in version 4.2.在版本4.2中新增

transactions.totalPreparedThenCommitted

Available on mongod only.仅在mongod上可用。

The total number of transactions that were prepared and committed on this server since the mongod process's last startup.mongod进程上次启动以来,在此服务器上准备并提交的事务总数。

New in version 4.2.在版本4.2中新增

transactions.totalPreparedThenAborted

Available on mongod only.仅在mongod上可用。

The total number of transactions that were prepared and aborted on this server since the mongod process's last startup.mongod进程上次启动以来,在此服务器上准备和中止的事务总数。

New in version 4.2.在版本4.2中新增

transactions.currentPrepared

Available on mongod only.仅在mongod上可用。

The current number of transactions in prepared state on this server.此服务器上处于准备状态的当前事务数。

New in version 4.2.在版本4.2中新增

transactions.lastCommittedTransaction

Available on mongod only.仅在mongod上可用。

The details of the last transaction committed when the mongod is primary.mongod为主时提交的最后一个事务的详细信息。

When returned from a secondary, lastCommittedTransaction returns the details of the last transaction committed when that secondary was a primary.当从次要事务返回时,lastCommittedTransaction返回该次要事务是主要事务时提交的最后一个事务的详细信息。

"lastCommittedTransaction" : {
   "operationCount" : NumberLong(1),
   "oplogOperationBytes" : NumberLong(211),
   "writeConcern" : {
      "w" : "majority",
      "wtimeout" : 0
   }
}
MetricsDescription描述
operationCountThe number of write operations in the transaction.事务中的写入操作数。
oplogOperationBytesThe size of the corresponding oplog entry or entries for the transaction. 事务的相应oplog条目的大小。[2]
writeConcernThe write concern used for the transaction.用于事务的写入关注点。

New in version 4.2.2.在版本4.2.2中新增 (Also available in 4.0.9)

[2] Starting in version 4.2, MongoDB creates as many oplog entries as necessary to encapsulate all write operations in a transaction whereas in version 4.0, the write operations in a transaction must fit within a single oplog entry. 从4.2版开始,MongoDB创建尽可能多的oplog条目,以封装事务中的所有写入操作,而在4.0版中,事务中的写入操作必须包含在一个oplog条目中。See Oplog Size Limit for details.有关详细信息,请参阅Oplog大小限制

transportSecurity

New in version 4.0.2.在版本4.0.2中新增 (Also available in 3.6.7+ and 3.4.17+)

"transportSecurity" : {
   "1.0" : NumberLong(<num>),
   "1.1" : NumberLong(<num>),
   "1.2" : NumberLong(<num>),
   "1.3" : NumberLong(<num>),
   "unknown" : NumberLong(<num>)
},
transportSecurity.<version>

New in version 4.0.2.在版本4.0.2中新增 (Also available in 3.6.7+ and 3.4.17+)

The cumulative number of TLS <version> connections that have been made to this mongod or mongos instance. 与此mongodmongos实例建立的TLS<version>连接的累积数量。The value is reset upon restart.重新启动时重置该值。

wiredTiger

wiredTiger information only appears if using the WiredTiger storage engine. Some of the statistics roll up for the server.wiredTiger信息仅在使用WiredTiger存储引擎时显示。一些统计信息汇总到服务器上。

{
   "uri" : "statistics:",
   "async" : {
      "current work queue length" : <num>,
      "maximum work queue length" : <num>,
      "number of allocation state races" : <num>,
      "number of flush calls" : <num>,
      "number of operation slots viewed for allocation" : <num>,
      "number of times operation allocation failed" : <num>,
      "number of times worker found no work" : <num>,
      "total allocations" : <num>,
      "total compact calls" : <num>,
      "total insert calls" : <num>,
      "total remove calls" : <num>,
      "total search calls" : <num>,
      "total update calls" : <num>
   },
   "block-manager" : {
      "blocks pre-loaded" : <num>,
      "blocks read" : <num>,
      "blocks written" : <num>,
      "bytes read" : <num>,
      "bytes written" : <num>,
      "bytes written for checkpoint" : <num>,
      "mapped blocks read" : <num>,
      "mapped bytes read" : <num>
   },
   "cache" : {
      "application threads page read from disk to cache count" : <num>,
      "application threads page read from disk to cache time (usecs)" : <num>,
      "application threads page write from cache to disk count" : <num>,
      "application threads page write from cache to disk time (usecs)" : <num>,
      "bytes belonging to page images in the cache" : <num>,
      "bytes belonging to the cache overflow table in the cache" : <num>,
      "bytes currently in the cache" : <num>,
      "bytes dirty in the cache cumulative" : <num>,
      "bytes not belonging to page images in the cache" : <num>,
      "bytes read into cache" : <num>,
      "bytes written from cache" : <num>,
      "cache overflow cursor application thread wait time (usecs)" : <num>,
      "cache overflow cursor internal thread wait time (usecs)" : <num>,
      "cache overflow score" : <num>,
      "cache overflow table entries" : <num>,
      "cache overflow table insert calls" : <num>,
      "cache overflow table max on-disk size" : <num>,
      "cache overflow table on-disk size" : <num>,
      "cache overflow table remove calls" : <num>,
      "checkpoint blocked page eviction" : <num>,
      "eviction calls to get a page" : <num>,
      "eviction calls to get a page found queue empty" : <num>,
      "eviction calls to get a page found queue empty after locking" : <num>,
      "eviction currently operating in aggressive mode" : <num>,
      "eviction empty score" : <num>,
      "eviction passes of a file" : <num>,
      "eviction server candidate queue empty when topping up" : <num>,
      "eviction server candidate queue not empty when topping up" : <num>,
      "eviction server evicting pages" : <num>,
      "eviction server slept, because we did not make progress with eviction" : <num>,
      "eviction server unable to reach eviction goal" : <num>,
      "eviction server waiting for a leaf page" : <num>,
      "eviction server waiting for an internal page sleep (usec)" : <num>,
      "eviction server waiting for an internal page yields" : <num>,
      "eviction state" : <num>,
      "eviction walk target pages histogram - 0-9" : <num>,
      "eviction walk target pages histogram - 10-31" : <num>,
      "eviction walk target pages histogram - 128 and higher" : <num>,
      "eviction walk target pages histogram - 32-63" : <num>,
      "eviction walk target pages histogram - 64-128" : <num>,
      "eviction walks abandoned" : <num>,
      "eviction walks gave up because they restarted their walk twice" : <num>,
      "eviction walks gave up because they saw too many pages and found no candidates" : <num>,
      "eviction walks gave up because they saw too many pages and found too few candidates" : <num>,
      "eviction walks reached end of tree" : <num>,
      "eviction walks started from root of tree" : <num>,
      "eviction walks started from saved location in tree" : <num>,
      "eviction worker thread active" : <num>,
      "eviction worker thread created" : <num>,
      "eviction worker thread evicting pages" : <num>,
      "eviction worker thread removed" : <num>,
      "eviction worker thread stable number" : <num>,
      "files with active eviction walks" : <num>,
      "files with new eviction walks started" : <num>,
      "force re-tuning of eviction workers once in a while" : <num>,
      "forced eviction - pages evicted that were clean count" : <num>,
      "forced eviction - pages evicted that were clean time (usecs)" : <num>,
      "forced eviction - pages evicted that were dirty count" : <num>,
      "forced eviction - pages evicted that were dirty time (usecs)" : <num>,
      "forced eviction - pages selected because of too many deleted items count" : <num>,
      "forced eviction - pages selected count" : <num>,
      "forced eviction - pages selected unable to be evicted count" : <num>,
      "forced eviction - pages selected unable to be evicted time" : <num>,
      "hazard pointer blocked page eviction" : <num>,
      "hazard pointer check calls" : <num>,
      "hazard pointer check entries walked" : <num>,
      "hazard pointer maximum array length" : <num>,
      "in-memory page passed criteria to be split" : <num>,
      "in-memory page splits" : <num>,
      "internal pages evicted" : <num>,
      "internal pages split during eviction" : <num>,
      "leaf pages split during eviction" : <num>,
      "maximum bytes configured" : <num>,
      "maximum page size at eviction" : <num>,
      "modified pages evicted" : <num>,
      "modified pages evicted by application threads" : <num>,
      "operations timed out waiting for space in cache" : <num>,
      "overflow pages read into cache" : <num>,
      "page split during eviction deepened the tree" : <num>,
      "page written requiring cache overflow records" : <num>,
      "pages currently held in the cache" : <num>,
      "pages evicted by application threads" : <num>,
      "pages queued for eviction" : <num>,
      "pages queued for eviction post lru sorting" : <num>,
      "pages queued for urgent eviction" : <num>,
      "pages queued for urgent eviction during walk" : <num>,
      "pages read into cache" : <num>,
      "pages read into cache after truncate" : <num>,
      "pages read into cache after truncate in prepare state" : <num>,
      "pages read into cache requiring cache overflow entries" : <num>,
      "pages read into cache requiring cache overflow for checkpoint" : <num>,
      "pages read into cache skipping older cache overflow entries" : <num>,
      "pages read into cache with skipped cache overflow entries needed later" : <num>,
      "pages read into cache with skipped cache overflow entries needed later by checkpoint" : <num>,
      "pages requested from the cache" : <num>,
      "pages seen by eviction walk" : <num>,
      "pages selected for eviction unable to be evicted" : <num>,
      "pages walked for eviction" : <num>,
      "pages written from cache" : <num>,
      "pages written requiring in-memory restoration" : <num>,
      "percentage overhead" : <num>,
      "tracked bytes belonging to internal pages in the cache" : <num>,
      "tracked bytes belonging to leaf pages in the cache" : <num>,
      "tracked dirty bytes in the cache" : <num>,
      "tracked dirty pages in the cache" : <num>,
      "unmodified pages evicted" : <num>
   },
   "capacity" : {
      "background fsync file handles considered" : <num>,
      "background fsync file handles synced" : <num>,
      "background fsync time (msecs)" : <num>,
      "bytes read" : <num>,
      "bytes written for checkpoint" : <num>,
      "bytes written for eviction" : <num>,
      "bytes written for log" : <num>,
      "bytes written total" : <num>,
      "threshold to call fsync" : <num>,
      "time waiting due to total capacity (usecs)" : <num>,
      "time waiting during checkpoint (usecs)" : <num>,
      "time waiting during eviction (usecs)" : <num>,
      "time waiting during logging (usecs)" : <num>,
      "time waiting during read (usecs)" : <num>
   },
   "connection" : {
      "auto adjusting condition resets" : <num>,
      "auto adjusting condition wait calls" : <num>,
      "detected system time went backwards" : <num>,
      "files currently open" : <num>,
      "memory allocations" : <num>,
      "memory frees" : <num>,
      "memory re-allocations" : <num>,
      "pthread mutex condition wait calls" : <num>,
      "pthread mutex shared lock read-lock calls" : <num>,
      "pthread mutex shared lock write-lock calls" : <num>,
      "total fsync I/Os" : <num>,
      "total read I/Os" : <num>,
      "total write I/Os" : <num>
   },
   "cursor" : {
      "cached cursor count" : <num>,
      "cursor bulk loaded cursor insert calls" : <num>,
      "cursor close calls that result in cache" : <num>,
      "cursor create calls" : <num>,
      "cursor insert calls" : <num>,
      "cursor insert key and value bytes" : <num>,
      "cursor modify calls" : <num>,
      "cursor modify key and value bytes affected" : <num>,
      "cursor modify value bytes modified" : <num>,
      "cursor next calls" : <num>,
      "cursor operation restarted" : <num>,
      "cursor prev calls" : <num>,
      "cursor remove calls" : <num>,
      "cursor remove key bytes removed" : <num>,
      "cursor reserve calls" : <num>,
      "cursor reset calls" : <num>,
      "cursor search calls" : <num>,
      "cursor search near calls" : <num>,
      "cursor sweep buckets" : <num>,
      "cursor sweep cursors closed" : <num>,
      "cursor sweep cursors examined" : <num>,
      "cursor sweeps" : <num>,
      "cursor truncate calls" : <num>,
      "cursor update calls" : <num>,
      "cursor update key and value bytes" : <num>,
      "cursor update value size change" : <num>,
      "cursors reused from cache" : <num>,
      "open cursor count" : <num>
   },
   "data-handle" : {
      "connection data handle size" : <num>,
      "connection data handles currently active" : <num>,
      "connection sweep candidate became referenced" : <num>,
      "connection sweep dhandles closed" : <num>,
      "connection sweep dhandles removed from hash list" : <num>,
      "connection sweep time-of-death sets" : <num>,
      "connection sweeps" : <num>,
      "session dhandles swept" : <num>,
      "session sweep attempts" : <num>
   },
   "lock" : {
      "checkpoint lock acquisitions" : <num>,
      "checkpoint lock application thread wait time (usecs)" : <num>,
      "checkpoint lock internal thread wait time (usecs)" : <num>,
      "dhandle lock application thread time waiting (usecs)" : <num>,
      "dhandle lock internal thread time waiting (usecs)" : <num>,
      "dhandle read lock acquisitions" : <num>,
      "dhandle write lock acquisitions" : <num>,
      "durable timestamp queue lock application thread time waiting (usecs)" : <num>,
      "durable timestamp queue lock internal thread time waiting (usecs)" : <num>,
      "durable timestamp queue read lock acquisitions" : <num>,
      "durable timestamp queue write lock acquisitions" : <num>,
      "metadata lock acquisitions" : <num>,
      "metadata lock application thread wait time (usecs)" : <num>,
      "metadata lock internal thread wait time (usecs)" : <num>,
      "read timestamp queue lock application thread time waiting (usecs)" : <num>,
      "read timestamp queue lock internal thread time waiting (usecs)" : <num>,
      "read timestamp queue read lock acquisitions" : <num>,
      "read timestamp queue write lock acquisitions" : <num>,
      "schema lock acquisitions" : <num>,
      "schema lock application thread wait time (usecs)" : <num>,
      "schema lock internal thread wait time (usecs)" : <num>,
      "table lock application thread time waiting for the table lock (usecs)" : <num>,
      "table lock internal thread time waiting for the table lock (usecs)" : <num>,
      "table read lock acquisitions" : <num>,
      "table write lock acquisitions" : <num>,
      "txn global lock application thread time waiting (usecs)" : <num>,
      "txn global lock internal thread time waiting (usecs)" : <num>,
      "txn global read lock acquisitions" : <num>,
      "txn global write lock acquisitions" : <num>
   },
   "log" : {
      "busy returns attempting to switch slots" : <num>,
      "force archive time sleeping (usecs)" : <num>,
      "log bytes of payload data" : <num>,
      "log bytes written" : <num>,
      "log files manually zero-filled" : <num>,
      "log flush operations" : <num>,
      "log force write operations" : <num>,
      "log force write operations skipped" : <num>,
      "log records compressed" : <num>,
      "log records not compressed" : <num>,
      "log records too small to compress" : <num>,
      "log release advances write LSN" : <num>,
      "log scan operations" : <num>,
      "log scan records requiring two reads" : <num>,
      "log server thread advances write LSN" : <num>,
      "log server thread write LSN walk skipped" : <num>,
      "log sync operations" : <num>,
      "log sync time duration (usecs)" : <num>,
      "log sync_dir operations" : <num>,
      "log sync_dir time duration (usecs)" : <num>,
      "log write operations" : <num>,
      "logging bytes consolidated" : <num>,
      "maximum log file size" : <num>,
      "number of pre-allocated log files to create" : <num>,
      "pre-allocated log files not ready and missed" : <num>,
      "pre-allocated log files prepared" : <num>,
      "pre-allocated log files used" : <num>,
      "records processed by log scan" : <num>,
      "slot close lost race" : <num>,
      "slot close unbuffered waits" : <num>,
      "slot closures" : <num>,
      "slot join atomic update races" : <num>,
      "slot join calls atomic updates raced" : <num>,
      "slot join calls did not yield" : <num>,
      "slot join calls found active slot closed" : <num>,
      "slot join calls slept" : <num>,
      "slot join calls yielded" : <num>,
      "slot join found active slot closed" : <num>,
      "slot joins yield time (usecs)" : <num>,
      "slot transitions unable to find free slot" : <num>,
      "slot unbuffered writes" : <num>,
      "total in-memory size of compressed records" : <num>,
      "total log buffer size" : <num>,
      "total size of compressed records" : <num>,
      "written slots coalesced" : <num>,
      "yields waiting for previous log file close" : <num>
   },
   "perf" : {
      "file system read latency histogram (bucket 1) - 10-49ms" : <num>,
      "file system read latency histogram (bucket 2) - 50-99ms" : <num>,
      "file system read latency histogram (bucket 3) - 100-249ms" : <num>,
      "file system read latency histogram (bucket 4) - 250-499ms" : <num>,
      "file system read latency histogram (bucket 5) - 500-999ms" : <num>,
      "file system read latency histogram (bucket 6) - 1000ms+" : <num>,
      "file system write latency histogram (bucket 1) - 10-49ms" : <num>,
      "file system write latency histogram (bucket 2) - 50-99ms" : <num>,
      "file system write latency histogram (bucket 3) - 100-249ms" : <num>,
      "file system write latency histogram (bucket 4) - 250-499ms" : <num>,
      "file system write latency histogram (bucket 5) - 500-999ms" : <num>,
      "file system write latency histogram (bucket 6) - 1000ms+" : <num>,
      "operation read latency histogram (bucket 1) - 100-249us" : <num>,
      "operation read latency histogram (bucket 2) - 250-499us" : <num>,
      "operation read latency histogram (bucket 3) - 500-999us" : <num>,
      "operation read latency histogram (bucket 4) - 1000-9999us" : <num>,
      "operation read latency histogram (bucket 5) - 10000us+" : <num>,
      "operation write latency histogram (bucket 1) - 100-249us" : <num>,
      "operation write latency histogram (bucket 2) - 250-499us" : <num>,
      "operation write latency histogram (bucket 3) - 500-999us" : <num>,
      "operation write latency histogram (bucket 4) - 1000-9999us" : <num>,
      "operation write latency histogram (bucket 5) - 10000us+" : <num>
   },
   "reconciliation" : {
      "fast-path pages deleted" : <num>,
      "page reconciliation calls" : <num>,
      "page reconciliation calls for eviction" : <num>,
      "pages deleted" : <num>,
      "split bytes currently awaiting free" : <num>,
      "split objects currently awaiting free" : <num>
   },
   "session" : {
      "open session count" : <num>,
      "session query timestamp calls" : <num>,
      "table alter failed calls" : <num>,
      "table alter successful calls" : <num>,
      "table alter unchanged and skipped" : <num>,
      "table compact failed calls" : <num>,
      "table compact successful calls" : <num>,
      "table create failed calls" : <num>,
      "table create successful calls" : <num>,
      "table drop failed calls" : <num>,
      "table drop successful calls" : <num>,
      "table import failed calls" : <num>,
      "table import successful calls" : <num>,
      "table rebalance failed calls" : <num>,
      "table rebalance successful calls" : <num>,
      "table rename failed calls" : <num>,
      "table rename successful calls" : <num>,
      "table salvage failed calls" : <num>,
      "table salvage successful calls" : <num>,
      "table truncate failed calls" : <num>,
      "table truncate successful calls" : <num>,
      "table verify failed calls" : <num>,
      "table verify successful calls" : <num>
   },
   "thread-state" : {
      "active filesystem fsync calls" : <num>,
      "active filesystem read calls" : <num>,
      "active filesystem write calls" : <num>
   },
   "thread-yield" : {
      "application thread time evicting (usecs)" : <num>,
      "application thread time waiting for cache (usecs)" : <num>,
      "connection close blocked waiting for transaction state stabilization" : <num>,
      "connection close yielded for lsm manager shutdown" : <num>,
      "data handle lock yielded" : <num>,
      "get reference for page index and slot time sleeping (usecs)" : <num>,
      "log server sync yielded for log write" : <num>,
      "page access yielded due to prepare state change" : <num>,
      "page acquire busy blocked" : <num>,
      "page acquire eviction blocked" : <num>,
      "page acquire locked blocked" : <num>,
      "page acquire read blocked" : <num>,
      "page acquire time sleeping (usecs)" : <num>,
      "page delete rollback time sleeping for state change (usecs)" : <num>,
      "page reconciliation yielded due to child modification" : <num>
   },
   "transaction" : {
      "Number of prepared updates" : <num>,
      "Number of prepared updates added to cache overflow" : <num>,
      "Number of prepared updates resolved" : <num>,
      "durable timestamp queue entries walked" : <num>,
      "durable timestamp queue insert to empty" : <num>,
      "durable timestamp queue inserts to head" : <num>,
      "durable timestamp queue inserts total" : <num>,
      "durable timestamp queue length" : <num>,
      "number of named snapshots created" : <num>,
      "number of named snapshots dropped" : <num>,
      "prepared transactions" : <num>,
      "prepared transactions committed" : <num>,
      "prepared transactions currently active" : <num>,
      "prepared transactions rolled back" : <num>,
      "query timestamp calls" : <num>,
      "read timestamp queue entries walked" : <num>,
      "read timestamp queue insert to empty" : <num>,
      "read timestamp queue inserts to head" : <num>,
      "read timestamp queue inserts total" : <num>,
      "read timestamp queue length" : <num>,
      "rollback to stable calls" : <num>,
      "rollback to stable updates aborted" : <num>,
      "rollback to stable updates removed from cache overflow" : <num>,
      "set timestamp calls" : <num>,
      "set timestamp durable calls" : <num>,
      "set timestamp durable updates" : <num>,
      "set timestamp oldest calls" : <num>,
      "set timestamp oldest updates" : <num>,
      "set timestamp stable calls" : <num>,
      "set timestamp stable updates" : <num>,
      "transaction begins" : <num>,
      "transaction checkpoint currently running" : <num>,
      "transaction checkpoint generation" : <num>,
      "transaction checkpoint max time (msecs)" : <num>,
      "transaction checkpoint min time (msecs)" : <num>,
      "transaction checkpoint most recent time (msecs)" : <num>,
      "transaction checkpoint scrub dirty target" : <num>,
      "transaction checkpoint scrub time (msecs)" : <num>,
      "transaction checkpoint total time (msecs)" : <num>,
      "transaction checkpoints" : <num>,
      "transaction checkpoints skipped because database was clean" : <num>,
      "transaction failures due to cache overflow" : <num>,
      "transaction fsync calls for checkpoint after allocating the transaction ID" : <num>,
      "transaction fsync duration for checkpoint after allocating the transaction ID (usecs)" : <num>,
      "transaction range of IDs currently pinned" : <num>,
      "transaction range of IDs currently pinned by a checkpoint" : <num>,
      "transaction range of IDs currently pinned by named snapshots" : <num>,
      "transaction range of timestamps currently pinned" : <num>,
      "transaction range of timestamps pinned by a checkpoint" : <num>,
      "transaction range of timestamps pinned by the oldest active read timestamp" : <num>,
      "transaction range of timestamps pinned by the oldest timestamp" : <num>,
      "transaction read timestamp of the oldest active reader" : <num>,
      "transaction sync calls" : <num>,
      "transactions committed" : <num>,
      "transactions rolled back" : <num>,
      "update conflicts" : <num>
   },
   "concurrentTransactions" : {
      "write" : {
         "out" : <num>,
         "available" : <num>,
         "totalTickets" : <num>
      },
      "read" : {
         "out" : <num>,
         "available" : <num>,
         "totalTickets" : <num>
      }
   },
   "snapshot-window-settings" : {
      "total number of SnapshotTooOld errors" : <num>,
      "max target available snapshots window size in seconds" : <num>,
      "target available snapshots window size in seconds" : <num>,
      "current available snapshots window size in seconds" : <num>,
      "latest majority snapshot timestamp available" : <string>,
      "oldest majority snapshot timestamp available" : <string>
   }
}
Note注意

The following is not an exhaustive list.以下并非详尽列表。

wiredTiger.uri

A string. 字符串。For internal use by MongoDB.供MongoDB内部使用。

wiredTiger.async

A document that returns statistics related to the asynchronous operations API. 返回与异步操作API相关的统计信息的文档。This is unused by MongoDB.这是MongoDB未使用的。

wiredTiger.block-manager

A document that returns statistics on the block manager operations.返回块管理器操作统计信息的文档。

wiredTiger.cache

A document that returns statistics on the cache and page evictions from the cache.返回缓存统计信息和从缓存中删除页面的文档。

The following describes some of the key wiredTiger.cache statistics:下面介绍了一些关键的wiredTiger.cache统计信息:

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 should not 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 should be 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 with the wiredTiger.cache.pages written from cache can provide an overview of the I/O activity.使用从缓存中写入的wiredTiger.cache.pageswiredTiger.cache.pages读取到缓存中,可以提供I/O活动的概述。

wiredTiger.cache.pages written from cache

Number of pages written from the cache. 从缓存写入的页数。wiredTiger.cache.pages written from cache with the wiredTiger.cache.pages read into cache can provide an overview of the I/O activity.从缓存中写入的wiredTiger.cache.pages和读取到缓存中的wiredTiger.cache.pages可以提供I/O活动的概述。

To adjust the size of the WiredTiger internal cache, see storage.wiredTiger.engineConfig.cacheSizeGB and --wiredTigerCacheSizeGB. 要调整WiredTiger内部缓存的大小,请参阅storage.wiredTiger.engineConfig.cacheSizeGB--wiredTigerCacheSizeGBAvoid increasing the WiredTiger internal cache size above its default value.避免将WiredTiger内部缓存大小增加到其默认值以上。

wiredTiger.connection

A document that returns statistics related to WiredTiger connections.返回与WiredTiger连接相关的统计信息的文档。

wiredTiger.cursor

A document that returns statistics on WiredTiger cursor.返回WiredTiger游标统计信息的文档。

wiredTiger.data-handle

A document that returns statistics on the data handles and sweeps.返回数据句柄和扫描统计信息的文档。

wiredTiger.log

A document that returns statistics on WiredTiger's write ahead log (i.e. the journal).返回WiredTiger预写日志(即日志)统计数据的文档。

Tip提示
wiredTiger.reconciliation

A document that returns statistics on the reconciliation process.返回对账过程统计信息的文档。

wiredTiger.session

A document that returns the open cursor count and open session count for the session.返回会话的打开游标计数和打开会话计数的文档。

wiredTiger.thread-yield

A document that returns statistics on yields during page acquisitions.返回页面获取期间产量统计数据的文档。

wiredTiger.transaction

A document that returns statistics on transaction checkpoints and operations.返回事务检查点和操作统计信息的文档。

wiredTiger.transaction.transaction checkpoint most recent time (msecs)

Amount of time, in milliseconds, to create the most recent checkpoint. 创建最新检查点的时间(毫秒)。An increase in this value under stead write load may indicate saturation on the I/O subsystem.在稳定写入负载下,此值的增加可能表明I/O子系统饱和。

wiredTiger.concurrentTransactions

A document that returns information on the number of concurrent of read and write transactions allowed into the WiredTiger storage engine. 返回WiredTiger存储引擎中允许的读写事务并发数信息的文档。These settings are MongoDB-specific.这些设置是MongoDB特定的。

To change the settings for concurrent reads and write transactions, see wiredTigerConcurrentReadTransactions and wiredTigerConcurrentWriteTransactions.要更改并发读写事务的设置,请参阅wiredTigerConcurrentReadTransactionswiredTigerConcurrentWriteTransactions

writeBacksQueued

"writeBacksQueued" : <boolean>,
writeBacksQueued

A boolean that indicates whether there are operations from a mongos instance queued for retrying. 一个布尔值,指示是否有来自mongos实例的操作排队等待重试。Typically, this value is false. 通常,该值为falseSee also writeBacks.另请参见writeBacks

mem

"mem" : {
   "bits" : <int>,
   "resident" : <int>,
   "virtual" : <int>,
   "supported" : <boolean>
},
mem

A document that reports on the system architecture of the mongod and current memory use.报告mongod系统架构和当前内存使用情况的文档。

mem.bits

A number, either 64 or 32, that indicates whether the MongoDB instance is compiled for 64-bit or 32-bit architecture.一个数字,6432,表示MongoDB实例是针对64位还是32位体系结构编译的。

mem.resident

The value of mem.resident is roughly equivalent to the amount of RAM, in mebibyte (MiB), currently used by the database process. mem.resident的值大致相当于数据库进程当前使用的RAM量,单位为mebibyte(MiB)。During normal use, this value tends to grow. In dedicated database servers, this number tends to approach the total amount of system memory.在正常使用过程中,该值趋于增长。在专用数据库服务器中,这个数字往往接近系统内存的总量。

mem.virtual

mem.virtual displays the quantity, in mebibyte (MiB), of virtual memory used by the mongod process.mem.virtual显示mongod进程使用的虚拟内存的数量,单位为mebibyte(MiB)。

mem.supported

A boolean that indicates whether the underlying system supports extended memory information. 指示基础系统是否支持扩展内存信息的布尔值。If this value is false and the system does not support extended memory information, then other mem values may not be accessible to the database server.如果该值为false,并且系统不支持扩展内存信息,则数据库服务器可能无法访问其他mem值。

mem.note

The field mem.note appears if mem.supported is false.如果mem.supportedfalse,则显示mem.note字段。

The mem.note field contains the text: mem.note字段包含文本:"not all mem info support on this platform".

metrics

"metrics" : {
   "apiVersions": {
      "<appName1>": <string>,
      "<appName2>": <string>,
      "<appName3>": <string>
   },
   "aggStageCounters" : {
         "<aggregation stage>" : NumberLong(<num>)
   },
   "commands": {
         "<command>": {
            "failed": NumberLong(<num>),
            "total": NumberLong(<num>)
         }
   },
   "cursor" : {
         "moreThanOneBatch" : NumberLong(<num>),
         "timedOut" : NumberLong(<num>),
         "totalOpened" : NumberLong(<num>),
         "lifespan" : {
            "greaterThanOrEqual10Minutes" : NumberLong(<num>),
            "lessThan10Minutes" : NumberLong(<num>),
            "lessThan15Seconds" : NumberLong(<num>),
            "lessThan1Minute" : NumberLong(<num>),
            "lessThan1Second" : NumberLong(<num>),
            "lessThan30Seconds" : NumberLong(<num>),
            "lessThan5Seconds" : NumberLong(<num>)
         },
         "open" : {
            "noTimeout" : NumberLong(<num>),
            "pinned" : NumberLong(<num>),
            "multiTarget" : NumberLong(<num>),
            "singleTarget" : NumberLong(<num>),
            "total" : NumberLong(<num>)
         }
   },
   "document" : {
         "deleted" : NumberLong(<num>),
         "inserted" : NumberLong(<num>),
         "returned" : NumberLong(<num>),
         "updated" : NumberLong(<num>)
   },
   "dotsAndDollarsFields" : {
         "inserts" : Long("0"),
         "updates" : Long("0")
   },
   "getLastError" : {
         "wtime" : {
            "num" : <num>,
            "totalMillis" : <num>
         },
         "wtimeouts" : NumberLong(<num>),
         "default" : {
             "unsatisfiable" : NumberLong(<num>),
             "wtimeouts" : NumberLong(<num>)
         }
   },
   "mongos" : {
      "cursor" : {
         "moreThanOneBatch" : NumberLong(<num>),
         "totalOpened" : NumberLong(<num>)
      }
   },
   "operation" : {
         "scanAndOrder" : NumberLong(<num>),
         "writeConflicts" : NumberLong(<num>)
   },
   "operatorCounters" : {
         "expressions" : {
            "<command>" : Long(<num>)
         },
         "match" : {
            "<command>" : Long(<num>)
         }
   },
   "queryExecutor": {
         "scanned" : NumberLong(<num>),
         "scannedObjects" : NumberLong(<num>),
         "collectionScans" : {
             "nonTailable" : NumbeLong(<num>),
             "total" : NumberLong(<num>)
         }
   },
   "record" : {
         "moves" : NumberLong(<num>)
   },
   "repl" : {
      "executor" : {
         "pool" : {
            "inProgressCount" : <num>
         },
         "queues" : {
            "networkInProgress" : <num>,
            "sleepers" : <num>
         },
         "unsignaledEvents" : <num>,
         "shuttingDown" : <boolean>,
         "networkInterface" : <string>
      },
      "apply" : {
         "attemptsToBecomeSecondary" : NumberLong(<num>),
         "batches" : {
            "num" : <num>,
            "totalMillis" : <num>
         },
         "ops" : NumberLong(<num>)
      },
      "buffer" : {
         "count" : NumberLong(<num>),
         "maxSizeBytes" : NumberLong(<num>),
         "sizeBytes" : NumberLong(<num>)
      },
      "initialSync" : {
         "completed" : NumberLong(<num>),
         "failedAttempts" : NumberLong(<num>),
         "failures" : NumberLong(<num>)
      },
      "network" : {
         "bytes" : NumberLong(<num>),
         "getmores" : {
            "num" : <num>,
            "totalMillis" : <num>
         },
         "notPrimaryLegacyUnacknowledgedWrites" : NumberLong(<num>),
         "notPrimaryUnacknowledgedWrites" : NumberLong(<num>),
         "oplogGetMoresProcessed" : {
            "num" : <num>,
            "totalMillis" : <num>
         },
         "ops" : NumberLong(<num>),
         "readersCreated" : NumberLong(<num>),
         "replSetUpdatePosition" : {
             "num" : NumberLong(<num>)
         }
      },
      "reconfig" : {
         "numAutoReconfigsForRemovalOfNewlyAddedFields" :
            NumberLong(<num>)
      },
      "stepDown" : {
         "userOperationsKilled" : NumberLong(<num>),
         "userOperationsRunning" : NumberLong(<num>)
      },
      "syncSource" : {
         "numSelections" : NumberLong(<num>),
         "numTimesChoseSame" : NumberLong(<num>),
         "numTimesChoseDifferent" : NumberLong(<num>),
         "numTimesCouldNotFind" : NumberLong(<num>)
      }
   },
   "storage" : {
         "freelist" : {
            "search" : {
               "bucketExhausted" : <num>,
               "requests" : <num>,
               "scanned" : <num>
            }
         }
   },
   "ttl" : {
         "deletedDocuments" : NumberLong(<num>),
         "passes" : NumberLong(<num>)
   }
},
metrics

A document that returns various statistics that reflect the current use and state of a running mongod instance.返回各种统计信息的文档,这些统计信息反映了正在运行的mongod实例的当前使用情况和状态。

metrics.aggStageCounters

A document that reports on the use of aggregation pipeline stages. 报告聚合管道阶段使用情况的文档。The fields in metrics.aggStageCounters are the names of aggregation pipeline stages. metrics.aggStageCounters中的字段是聚合管道阶段的名称。For each pipeline stage, serverStatus reports the number of times that stage has been executed.对于每个管道阶段,serverStatus报告该阶段已执行的次数。

New in version 4.4 (4.2.6 and 4.0.19).Updated in version 5.2 (and 5.0.6).4.4版(4.2.6和4.0.19)中的新增功能在5.2版(和5.0.6)中更新。

metrics.apiVersions

A document with client applications and the version of Stable API which they are configured with. 包含客户端应用程序及其配置的稳定API版本的文档。Consider the following when viewing metrics.apiVersions:查看metrics.apiVersions时请考虑以下事项:

  • The only possible returned values for each appname are default or 1.每个appname唯一可能返回的值是default1
  • API version metrics are retained for 24 hours. API版本指标保留24小时。If no commands are issued with a specific API version from an application in the past 24 hours, that appname and API version will be removed from the metrics. 如果在过去24小时内没有从应用程序发出带有特定API版本的命令,则该appname和API版本将从度量中删除。This also applies to the default API version metric.这也适用于default API版本度量。
  • Set the appname when connecting to a MongoDB instance by specifying the appname in the connection URI. 在连接到MongoDB实例时,通过在连接URI中指定appname来设置appname?appName=ZZZ sets the appname to ZZZZ.appname设置为ZZZZ
  • Drivers accessing the Stable API can set a default appname.访问Stable API的驱动程序可以设置默认appname
  • If no appname is configured, a default value will be automatically populated based on the product. 如果未配置appname,将根据产品自动填充默认值。For example, for a MongoDB Compass connection with no appname in the URI, the metric returns: 'MongoDB Compass': [ 'default' ].例如,对于URI中没有appnameMongoDB Compass连接,度量返回:'MongoDB Compass': [ 'default' ]

New in version 5.0..在版本5.0.中新增

metrics.operatorCounters

A document that reports on the use of aggregation pipeline operators and expressions.报告聚合管道运算符和表达式使用情况的文档。

metrics.operatorCounters.expressions

A document with a number that indicates how often Expression Operators ran.一个带有数字的文档,该数字指示表达式运算符的运行频率。

To get metrics for a specific operator, such as the greater-than operator ($gt), append the operator to the command:要获取特定运算符(如大于运算符($gt))的度量,请将运算符附加到命令:

db.runCommand( { serverStatus: 1 } ).metrics.operatorCounters.expressions.$gt

New in version 5.0.在版本5.0中新增

metrics.operatorCounters.match

A document with a number that indicates how often match expressions ran.带有数字的文档,该数字指示匹配表达式的运行频率。

Match expression operators also increment as part of an aggregation pipeline $match stage. 匹配表达式运算符也作为聚合管道$match阶段的一部分递增。If the $match stage uses the $expr operator, the counter for $expr increments, but the component counters do not increment.如果$match阶段使用$expr运算符,则$expr的计数器递增,但组件计数器不递增。

Consider the following query:考虑以下查询:

db.matchCount.aggregate(
   [
      { $match:
         {  $expr: { $gt: [ "$_id", 0 ] } }
      }
   ]
)

The counter for $expr increments when the query runs. $expr的计数器在查询运行时递增。The counter for $gt does not.$gt的计数器没有。

New in version 5.1.在版本5.1中新增

metrics.commands

A document that reports on the use of database commands. 报告数据库命令使用情况的文档。The fields in metrics.commands are the names of database commands. metrics.commands中的字段是数据库命令的名称。For each command, the serverStatus reports the total number of executions and the number of failed executions.对于每个命令,serverStatus报告执行总数和失败的执行数。

Starting in MongoDB 4.0.13 and 4.2.1, metrics.commands include replSetStepDownWithForce (i.e. the replSetStepDown command with force: true) as well as the overall replSetStepDown. 从MongoDB 4.0.13和4.2.1开始,metrics.commands包括replSetStepDownWithForce(即具有force:truereplSetStepDown命令)以及整个replSetStepDownIn earlier versions, the command reported only overall replSetStepDown metrics.在早期版本中,该命令仅报告总体replSetStepDown度量。

metrics.commands.<command>.failed

The number of times <command> failed on this mongod.<command>在此mongod上失败的次数。

metrics.commands.<command>.total

The number of times <command> executed on this mongod.在此mongod上执行<command>的次数。

metrics.commands.update.pipeline

The number of times an aggregation pipeline was used to update documents on this mongod. 聚合管道用于更新此mongod上的文档的次数。Subtract this value from the total number of updates to get the number of updates made with document syntax.从更新总数中减去此值,以获得使用文档语法进行的更新数。

The pipeline counter is only available for update and findAndModify operations.pipeline计数器仅可用于updatefindAndModify操作。

metrics.commands.findAndModify.pipeline

The number of times findAndModify() was used in an aggregation pipeline to update documents on this mongod.聚合管道中使用findAndModify()更新此mongod上的文档的次数。

The pipeline counter is only available for update and findAndModify operations.pipeline计数器仅可用于updatefindAndModify操作。

metrics.commands.update.arrayFilters

The number of times an arrayFilter was used to update documents on this mongod.arrayFilter用于更新此mongod上的文档的次数。

The arrayFilters counter is only available for update and findAndModify operations.arrayFilters计数器仅可用于updatefindAndModify操作。

metrics.commands.findAndModify.arrayFilters

The number of times an arrayFilter was used with findAndModify() to update documents on this mongod.arrayFilterfindAndModify()一起用于更新此mongod上的文档的次数。

The arrayFilters counter is only available for update and findAndModify operations.arrayFilters计数器仅可用于updatefindAndModify操作。

metrics.document

A document that reflects document access and modification patterns. 反映文档访问和修改模式的文档。Compare these values to the data in the opcounters document, which track total number of operations.将这些值与跟踪操作总数的opcounters文档中的数据进行比较。

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.dotsAndDollarsFields

A document with a number that indicates how often insert or update operations ran using a dollar ($) prefixed name. 带有数字的文档,该数字指示使用美元($)前缀名称运行插入或更新操作的频率。The value does not report the exact number of operations.该值不报告操作的确切数量。

When an upsert operation creates a new document, it is considered to be an insert rather than an update.upsert操作创建新文档时,它被视为insert而不是update

New in version 5.0.在版本5.0中新增

metrics.executor

A document that reports on various statistics for the replication executor.报告复制执行器的各种统计信息的文档。

metrics.getLastError

A document that reports on write concern use.报告写入关注使用情况的文档。

metrics.getLastError.wtime

A document that reports write concern operation counts with a w argument greater than 1.报告写入关注操作的文档的w参数大于1

metrics.getLastError.wtime.num

The total number of operations with a specified write concern (i.e. w) that wait for one or more members of a replica set to acknowledge the write operation (i.e. a w value greater than 1.)具有指定写入问题(即w)的操作总数,这些操作等待副本集的一个或多个成员确认写入操作(即w值大于1

metrics.getLastError.wtime.totalMillis

The total amount of time in milliseconds that the mongod has spent performing write concern operations with a write concern (i.e. w) that waits for one or more members of a replica set to acknowledge the write operation (i.e. a w value greater than 1.)mongod用写关注点(即w)执行写关注点操作所花费的总时间(以毫秒为单位),该写关注点等待副本集的一个或多个成员确认写操作(即w值大于1)

metrics.getLastError.wtimeouts

The number of times that write concern operations have timed out as a result of the wtimeout threshold. 写入关注操作由于wtimeout阈值而超时的次数。This number increments for both default and non-default write concern specifications.对于默认和非默认写问题规范,此数字都会增加。

metrics.getLastError.default

A document that reports on when a default write concern was used (meaning, a non-clientSupplied write concern). 报告何时使用默认写入关注(即非clientSupplied写入关注)的文档。The possible origins of a default write concern are:默认写入问题的可能来源是:

  • implicitDefault
  • customDefault
  • getLastErrorDefaults

Refer to the following table for information on each possible write concern origin, or provenance:请参阅下表,了解每个可能的书面问题来源或provenance的信息:

ProvenanceDescription描述
clientSuppliedThe write concern was specified in the application.应用程序中指定了写入问题。
customDefaultThe write concern originated from a custom defined default value. 写入问题源自自定义定义的默认值。See setDefaultRWConcern. 请参阅setDefaultRWConcern
getLastErrorDefaultsThe write concern originated from the replica set's settings.getLastErrorDefaults field. 写入问题源自副本集的settings.getLastErrorDefaults字段。
implicitDefaultThe write concern originated from the server in absence of all other write concern specifications. 在没有所有其他写问题规范的情况下,写问题源于服务器。
metrics.getLastError.default.unsatisfiable

Number of times that a non-clientSupplied write concern returned the UnsatisfiableWriteConcern error code.clientSupplied写入关注返回UnsatisiableWriteConcern错误代码的次数。

metrics.getLastError.default.wtimeouts

Number of times a non-clientSupplied write concern timed out.clientSupplied写入问题超时的次数。

metrics.mongos

A document that contains metrics about mongos.包含mongos指标的文档。

metrics.mongos.cursor

A document that contains metrics for cursors used by mongos.包含mongos使用的游标指标的文档。

metrics.mongos.cursor.moreThanOneBatch

The total number of cursors that have returned more than one batch since mongos started. mongos启动以来已返回多个批的游标总数。Additional batches are retrieved using the getMore command.使用getMore命令检索其他批次。

New in version 5.0.在版本5.0中新增

metrics.mongos.cursor.totalOpened

The total number of cursors that have been opened since mongos started, including cursors currently open. mongos启动以来已打开的游标总数,包括当前打开的游标。Differs from metrics.cursor.open.total, which is the number of currently open cursors only.metrics.cursor.open.total不同,后者仅为当前打开的游标数。

New in version 5.0.在版本5.0中新增

metrics.operation

A document that holds counters for several types of update and query operations that MongoDB handles using special operation types.一个文档,包含MongoDB使用特殊操作类型处理的几种更新和查询操作的计数器。

metrics.operation.scanAndOrder

The total number of queries that return sorted numbers that cannot perform 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 and query-plan evaluation. 在查询和查询计划评估期间扫描的索引项总数。This counter is the same as totalKeysExamined in the output of explain().此计数器与explain()输出中的totalKeysExamined相同。

metrics.queryExecutor.scannedObjects

The total number of documents scanned during queries and query-plan evaluation. 在查询和查询计划评估期间扫描的文档总数。This counter is the same as totalDocsExamined in the output of explain().此计数器与explain()输出中的totalDocsExamined相同。

metrics.queryExecutor.collectionScans

A document that reports on the number of queries that performed a collection scan.报告执行集合扫描的查询数的文档。

New in version 4.4.在版本4.4中新增

metrics.queryExecutor.collectionScans.nonTailable

The number of queries that performed a collection scan that did not use a tailable cursor.执行不使用可跟踪游标的集合扫描的查询数。

New in version 4.4.在版本4.4中新增

metrics.queryExecutor.collectionScans.total

The total number queries that performed a collection scan. 执行集合扫描的查询总数。The total consists of queries that did and did not use a tailable cursor.总数包括使用和不使用可跟踪游标的查询。

New in version 4.4.在版本4.4中新增

metrics.record

A document that reports on data related to record allocation in the on-disk memory files.报告与磁盘内存文件中记录分配相关的数据的文档。

metrics.repl

A document that reports metrics related to the replication process. 报告与复制过程相关的度量的文档。metrics.repl document appears on all mongod instances, even those that aren't members of replica sets.metrics.repl文档出现在所有mongod实例上,即使是那些不是副本集成员的实例。

metrics.repl.apply

A document that reports on the application of operations from the replication oplog.报告复制oplog中操作应用程序的文档。

metrics.repl.apply.batchSize

New in version 4.0.6.在版本4.0.6中新增 (Also available in 3.6.11+)(3.6.11+中也提供)

The total number of oplog operations applied. 应用的oplog操作总数。The metrics.repl.apply.batchSize is incremented with the number of operations in a batch at the batch boundaries instead of being incremented by one after each operation.metrics.repl.apply.batchSize在批次边界处随批次中的操作数递增,而不是在每次操作后递增一。

For finer granularity, see metrics.repl.apply.ops.有关更精细的粒度,请参阅metrics.repl.apply.ops

metrics.repl.apply.batches

metrics.repl.apply.batches reports on the oplog application process on secondaries members of replica sets. metrics.repl.apply.batches报告副本集的secondary成员上的oplog应用程序进程。See Multithreaded Replication for more information on the oplog application processes.有关oplog应用程序进程的更多信息,请参阅多线程复制

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 has spent applying operations from the oplog.mongod从oplog应用操作所花费的总时间(毫秒)。

metrics.repl.apply.ops

The total number of oplog operations applied. 应用的oplog操作总数。metrics.repl.apply.ops is incremented after each operation.在每次操作后递增。

Tip提示
See also: 参阅:
metrics.repl.buffer

MongoDB buffers oplog operations from the replication sync source buffer before applying oplog entries in a batch. MongoDB在批处理中应用oplog条目之前,从复制同步源缓冲区缓冲oplog操作。metrics.repl.buffer provides a way to track the oplog buffer. 提供了跟踪oplog缓冲区的方法。See Multithreaded Replication for more information on the oplog application process.有关oplog应用程序进程的更多信息,请参阅多线程复制

metrics.repl.buffer.count

The current number of operations in the oplog buffer.oplog缓冲区中当前的操作数。

metrics.repl.buffer.maxSizeBytes

The maximum size of the buffer. 缓冲区的最大大小。This value is a constant setting in the mongod, and is not configurable.该值是mongod中的常量设置,不可配置。

metrics.repl.buffer.sizeBytes

The current size of the contents of the oplog buffer.oplog缓冲区内容的当前大小。

metrics.repl.network

metrics.repl.network reports network use by the replication process.报告复制进程的网络使用情况。

metrics.repl.network.bytes

metrics.repl.network.bytes reports the total amount of data read from the replication sync source.报告从复制同步源读取的数据总量。

metrics.repl.network.getmores

metrics.repl.network.getmores reports on the getmore operations, which are requests for additional results from the oplog cursor as part of the oplog replication process.报告getmore操作,这些操作是作为oplog复制过程的一部分从oplog游标请求附加结果。

metrics.repl.network.getmores.num

metrics.repl.network.getmores.num reports the total number of getmore operations, which are operations that request an additional set of operations from the replication sync source.报告getmore操作的总数,这些操作请求来自复制同步源的附加操作集。

metrics.repl.network.getmores.totalMillis

metrics.repl.network.getmores.totalMillis reports the total amount of time required to collect data from getmore operations.报告从getmore操作集合数据所需的总时间。

Note注意

This number can be quite large, as MongoDB will wait for more data even if the getmore operation does not initial return data.这个数字可能非常大,因为即使getmore操作没有初始返回数据,MongoDB也会等待更多数据。

metrics.repl.network.getmores.numEmptyBatches

The number of empty oplog batches a secondary receives from its sync source. 辅助设备从其同步源接收的空oplog批数。A secondary receives an empty batch if it is fully synced with its source and either:如果辅助设备与其源设备完全同步,并且:

  • The getmore times out waiting for more data, orgetmore超时等待更多数据,或
  • The sync source's majority commit point has advanced since the last batch sent to this secondary.同步源的多数提交点自上一批发送到此辅助文件以来已提前。

For a primary, if the instance was previously a secondary, the number reports on the empty batches received when it was a secondary. 对于主实例,如果该实例以前是辅助实例,则该数字报告在它是辅助实例时收到的空批次。Otherwise, for a primary, this number is 0.否则,对于主系统,此数字为0。

New in version 4.4.在版本4.4中新增

metrics.repl.network.notPrimaryLegacyUnacknowledgedWrites

The number of unacknowledged (w: 0) legacy write operations (see Opcodes) that failed because the current mongod is not in PRIMARY state.由于当前mongod未处于PRIMARY状态而失败的未确认(w:0)遗留写入操作(请参阅Opcodes)的数量。

New in version 4.2.在版本4.2中新增

metrics.repl.network.notPrimaryUnacknowledgedWrites

The number of unacknowledged (w: 0) write operations that failed because the current mongod is not in PRIMARY state.由于当前mongod未处于PRIMARY状态而失败的未确认(w:0)写入操作数。

New in version 4.2.在版本4.2中新增

metrics.repl.network.oplogGetMoresProcessed

A document that reports the number of getMore commands to fetch the oplog that a node processed as a sync source.报告获取节点作为同步源处理的oploggetMore命令数的文档。

New in version 4.4.在版本4.4中新增

metrics.repl.network.oplogGetMoresProcessed.num

The number of getMore commands to fetch the oplog that a node processed as a sync source.获取节点作为同步源处理的oploggetMore命令数。

New in version 4.4.在版本4.4中新增

metrics.repl.network.oplogGetMoresProcessed.totalMillis

The time, in milliseconds, that a node spent processing the getMore commands counted in metrics.repl.network.oplogGetMoresProcessed.num.节点处理getMore命令所花费的时间(以毫秒为单位),以metrics.repl.network.oplogGetMoresProcessed.num为单位。

New in version 4.4.在版本4.4中新增

metrics.repl.network.ops

The total number of operations read from the replication source.从复制源读取的操作总数。

metrics.repl.network.readersCreated

The total number of oplog query processes created. MongoDB will create a new oplog query any time an error occurs in the connection, including a timeout, or a network operation. 创建的oplog查询进程总数。MongoDB将在连接中发生错误(包括超时或网络操作)时创建新的oplog查询。Furthermore, metrics.repl.network.readersCreated will increment every time MongoDB selects a new source for replication.此外,每次MongoDB选择新的复制源时,metrics.repl.network.readersCreated都会增加。

metrics.repl.network.replSetUpdatePosition

A document that reports the number of replSetUpdatePosition commands a node sent to its sync source.报告节点发送到其同步源的replSetUpdatePosition命令数的文档。

New in version 4.4.在版本4.4中新增

metrics.repl.network.replSetUpdatePosition.num

The number of replSetUpdatePosition commands a node sent to its sync source. 节点发送到其同步源的replSetUpdatePosition命令数。replSetUpdatePosition commands are internal replication commands that communicate replication progress from nodes to their sync sources.命令是将复制进度从节点传递到其同步源的内部复制命令。

New in version 4.4.在版本4.4中新增

Note注意

Replica set members in the STARTUP2 state do not send the replSetUpdatePosition command to their sync source.处于STARTUP2状态的副本集成员不会向其同步源发送replSetUpdatePosition命令。

metrics.repl.reconfig

A document containing the number of times that member newlyAdded fields were automatically removed by the primary. 包含成员newAdded字段被主字段自动删除的次数的文档。When a member is first added to the replica set, the member's newlyAdded field is set to true.当成员首次添加到副本集时,成员的newAdded字段设置为true

New in version 5.0.在版本5.0中新增

metrics.repl.reconfig.numAutoReconfigsForRemovalOfNewlyAddedFields

The number of times that newlyAdded member fields were automatically removed by the primary. newlyAdded成员字段被主要成员自动删除的次数。When a member is first added to the replica set, the member's newlyAdded field is set to true. 当成员首次添加到副本集时,成员的newlyAdded字段设置为trueAfter the primary receives the member's heartbeat response indicating the member state is SECONDARY, RECOVERING, or ROLLBACK, the primary automatically removes the member's newlyAdded field. 在主服务器接收到成员的心跳响应(指示成员状态为SECONDARYRECOVERINGRECOVERING)后,主服务器会自动删除成员的newlyAdded字段。The newlyAdded fields are stored in the local.system.replset collection.newlyAdded字段存储在local.system.replset集合中。

New in version 5.0.在版本5.0中新增

metrics.repl.stepDown

Information on user operations that were running when the mongod stepped down.有关mongod下台时正在运行的用户操作的信息。

New in version 4.2.在版本4.2中新增

metrics.repl.stepDown.userOperationsKilled

The number of user operations killed when the mongod stepped down.mongod下台时,用户操作被杀死的数量。

New in version 4.2.在版本4.2中新增

metrics.repl.stepDown.userOperationsRunning

The number of user operations that remained running when the mongod stepped down.mongod关闭时仍在运行的用户操作数。

New in version 4.2.在版本4.2中新增

metrics.repl.syncSource

Information on a replica set node's sync source selection process.有关副本集节点的同步源选择过程的信息。

New in version 4.4.在版本4.4中新增

metrics.repl.syncSource.numSelections

Number of times a node attempted to choose a node to sync from among the available sync source options. 节点尝试从可用的同步源选项中选择要同步的节点的次数。A node attempts to choose a node to sync from if, for example, the sync source is re-evaluated or the node receives an error from its current sync source.例如,如果重新评估同步源或节点从其当前同步源收到错误,则节点尝试选择要同步的节点。

New in version 4.4.在版本4.4中新增

metrics.repl.syncSource.numTimesChoseSame

Number of times a node kept its original sync source after re-evaluating if its current sync source was optimal.节点在重新评估其当前同步源是否最佳后保留其原始同步源的次数。

New in version 4.4.在版本4.4中新增

metrics.repl.syncSource.numTimesChoseDifferent

Number of times a node chose a new sync source after re-evaluating if its current sync source was optimal.节点在重新评估其当前同步源是否最佳后选择新同步源的次数。

New in version 4.4.在版本4.4中新增

metrics.repl.syncSource.numTimesCouldNotFind

Number of times a node could not find an available sync source when attempting to choose a node to sync from.尝试选择要同步的节点时,节点找不到可用同步源的次数。

New in version 4.4.在版本4.4中新增

metrics.storage.freelist.search.bucketExhausted

The number of times that mongod has examined the free list without finding a large record allocation.mongod在没有找到大量记录分配的情况下检查免费列表的次数。

metrics.storage.freelist.search.requests

The number of times mongod has searched for available record allocations.mongod搜索可用记录分配的次数。

metrics.storage.freelist.search.scanned

The number of available record allocations mongod has searched.已搜索的可用记录分配数。

metrics.ttl

A document that reports on the operation of the resource use of the ttl index process.报告ttl索引进程资源使用操作的文档。

metrics.ttl.deletedDocuments

The total number of documents deleted from collections with a ttl index.从具有ttl索引的集合中删除的文档总数。

metrics.ttl.passes

The number of times the background process removes documents from collections with a ttl index.后台进程从具有ttl索引的集合中删除文档的次数。

metrics.cursor

A document that contains data regarding cursor state and use.包含游标状态和使用数据的文档。

metrics.cursor.moreThanOneBatch

The total number of cursors that have returned more than one batch since the server process started. 自服务器进程启动以来返回多个批处理的游标总数。Additional batches are retrieved using the getMore command.使用getMore命令检索其他批次。

New in version 5.0.在版本5.0中新增

metrics.cursor.timedOut

The total number of cursors that have timed out since the server process started. 自服务器进程启动以来超时的游标总数。If this number is large or growing at a regular rate, this may indicate an application error.如果这个数字很大或以正常速度增长,这可能表明应用程序错误。

metrics.cursor.totalOpened

The total number of cursors that have been opened since the server process started, including cursors currently open. 自服务器进程启动以来已打开的游标总数,包括当前打开的游标。Differs from metrics.cursor.open.total, which is the number of currently open cursors only.metrics.cursor.open.total不同,后者仅为当前打开的游标数。

New in version 5.0.在版本5.0中新增

metrics.cursor.lifespan

A document that reports the number of cursors that have lifespans within specified time periods. 报告在指定时间段内具有寿命的游标数的文档。The cursor lifespan is the time period from when the cursor is created to when the cursor is killed using the killCursors command or the cursor has no remaining objects in the batch.游标寿命是从创建游标到使用killCursors命令终止游标或游标在批处理中没有剩余对象的时间段。

The lifespan time periods are:使用期限为:

  • < 1 second
  • >= 1 second to < 5 seconds
  • >= 5 seconds to < 15 seconds
  • >= 15 seconds to < 30 seconds
  • >= 30 seconds to < 1 minute
  • >= 1 minute to < 10 minutes
  • >= 10 minutes

New in version 5.0.在版本5.0中新增

metrics.cursor.lifespan.greaterThanOrEqual10Minutes

The number of cursors with a lifespan >= 10 minutes.寿命大于等于10分钟的游标数。

New in version 5.0.在版本5.0中新增

metrics.cursor.lifespan.lessThan10Minutes

The number of cursors with a lifespan >= 1 minute to < 10 minutes.寿命大于等于1分钟到小于10分钟的游标数。

New in version 5.0.在版本5.0中新增

metrics.cursor.lifespan.lessThan15Seconds

The number of cursors with a lifespan >= 5 seconds to < 15 seconds.寿命大于等于5秒到小于15秒的游标数。

New in version 5.0.在版本5.0中新增

metrics.cursor.lifespan.lessThan1Minute

The number of cursors with a lifespan >= 30 seconds to < 1 minute.寿命>=30秒至<1分钟的游标数。

New in version 5.0.在版本5.0中新增

metrics.cursor.lifespan.lessThan1Second

The number of cursors with a lifespan < 1 second.寿命小于1秒的游标数。

New in version 5.0.在版本5.0中新增

metrics.cursor.lifespan.lessThan30Seconds

The number of cursors with a lifespan >= 15 seconds to < 30 seconds.寿命大于等于15秒到小于30秒的游标数。

New in version 5.0.在版本5.0中新增

metrics.cursor.lifespan.lessThan5Seconds

The number of cursors with a lifespan >= 1 second to < 5 seconds.寿命大于等于1秒到小于5秒的游标数。

New in version 5.0.在版本5.0中新增

metrics.cursor.open

A document that contains data regarding open cursors.包含有关打开游标的数据的文档。

metrics.cursor.open.noTimeout

The number of open cursors with the option DBQuery.Option.noTimeout set to prevent timeout after a period of inactivity.设置选项DBQuery.Option.noTimeout以防止在一段时间不活动后超时的打开游标数。

metrics.cursor.open.pinned

The number of "pinned" open cursors.“固定”打开游标的数量。

metrics.cursor.open.total

The number of cursors that MongoDB is maintaining for clients. MongoDB为客户端维护的游标数。Because MongoDB exhausts unused cursors, typically this value small or zero. 因为MongoDB会耗尽未使用的游标,通常该值很小或为零。However, if there is a queue, or stale tailable cursors, or a large number of operations this value may increase.但是,如果存在队列、过时的可跟踪游标或大量操作,则此值可能会增加。

metrics.cursor.open.singleTarget

The total number of cursors that only target a single shard. 仅针对单个分片的游标总数。Only mongos instances report metrics.cursor.open.singleTarget values.只有mongos实例报告metrics.cursor.open.singleTarget值。

metrics.cursor.open.multiTarget

The total number of cursors that only target more than one shard. 仅针对多个分片的游标总数。Only mongos instances report metrics.cursor.open.multiTarget values.只有mongos实例报告metrics.cursor.open.multiTarget值。

watchdog

"watchdog" : {
   "checkGeneration" : NumberLong(<num>),
   "monitorGeneration" : NumberLong(<num>),
   "monitorPeriod" : <num>
}
Note注意

The watchdog section is only present if the Storage Node Watchdog is enabled.只有在启用了存储节点监视器时,watchdog部分才会出现。

watchdog

A document reporting the status of the Storage Node Watchdog.报告存储节点监视器状态的文档。

watchdog.checkGeneration

The number of times the directories have been checked since startup. 自启动以来检查目录的次数。Directories are checked multiple times every monitoringPeriod.每个monitoringPeriod检查目录多次。

watchdog.monitorGeneration

The number of times the status of all filesystems used by mongod has been examined. mongod使用的所有文件系统的状态被检查的次数。This is incremented once every monitoringPeriod.每个monitoringPeriod递增一次。

watchdog.monitorPeriod

The value set by watchdogPeriodSeconds. watchdogPeriodSeconds设置的值。This is the period between status checks.这是状态检查之间的间隔时间。

←  profileshardConnPoolStats →