Skip to content

DOCS-1474 moved collection-pool-stats to connPoolStats #952

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions bin/htaccess.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1438,6 +1438,14 @@ redirect-path: '/reference/commands'
url-base: '/reference/command'
type: 'redirect'
code: 301
outputs:
- 'after-v2.2'
- 'manual'
---
redirect-path: '/reference/connection-pool-stats'
url-base: '/reference/command/connPoolStats'
type: 'redirect'
code: 301
outputs:
- 'after-v2.2'
- 'manual'
Expand Down
2 changes: 1 addition & 1 deletion source/meta/reference.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Status, Monitoring, and Reporting Output
/reference/command/serverStatus
/reference/database-statistics
/reference/collection-statistics
/reference/connection-pool-stats
/reference/command/connPoolStats
/reference/replica-status
/reference/exit-codes
/reference/current-op
Expand Down
2 changes: 1 addition & 1 deletion source/reference.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Status and Reporting
reference/database-statistics
reference/collection-statistics
reference/collection-validation
reference/connection-pool-stats
reference/command/connPoolStats
reference/current-op
reference/database-profiler
reference/explain
Expand Down
163 changes: 161 additions & 2 deletions source/reference/command/connPoolStats.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ connPoolStats

.. default-domain:: mongodb

Definition
----------

.. dbcommand:: connPoolStats

.. include:: /includes/note-conn-pool-stats.rst
Expand All @@ -19,5 +22,161 @@ connPoolStats
{ connPoolStats: 1 }

The value of the argument (i.e. ``1`` ) does not affect the
output of the command. See :doc:`/reference/connection-pool-stats`
for full documentation of the :dbcommand:`connPoolStats` output.
output of the command.

.. include:: /includes/note-conn-pool-stats.rst

Output
------

.. data:: connPoolStats.hosts

The sub-documents of the :data:`~connPoolStats.hosts` :term:`document` report connections
between the :program:`mongos` or :program:`mongod` instance and each component
:program:`mongod` of the :term:`sharded cluster`.

.. data:: connPoolStats.hosts.[host].available

:data:`~connPoolStats.hosts.[host].available` reports the total number of
connections that the :program:`mongos` or :program:`mongod`
could use to connect to this :program:`mongod`.

.. data:: connPoolStats.hosts.[host].created

:data:`~connPoolStats.hosts.[host].created` reports the number of connections
that this :program:`mongos` or :program:`mongod` has ever created for this host.

.. data:: connPoolStats.replicaSets

:data:`~connPoolStats.replicaSets` is a :term:`document` that contains
:term:`replica set` information for the :term:`sharded cluster`.

.. data:: connPoolStats.replicaSets.shard

The :data:`~connPoolStats.replicaSets.shard` :term:`document` reports
on each :term:`shard` within the :term:`sharded cluster`

.. data:: connPoolStats.replicaSets.[shard].host

The :data:`~connPoolStats.replicaSets.[shard].host` field holds an array of
:term:`document` that reports on each host within the
:term:`shard` in the :term:`replica set`.

These values derive from the :doc:`replica set status
</reference/replica-status>` values.

.. data:: connPoolStats.replicaSets.[shard].host[n].addr

:data:`~connPoolStats.replicaSets.[shard].host[n].addr` reports the address
for the host in the :term:`sharded cluster` in the format of
"``[hostname]:[port]``".

.. data:: connPoolStats.replicaSets.[shard].host[n].ok

:data:`~connPoolStats.replicaSets.[shard].host[n].ok` reports ``false``
when:

- the :program:`mongos` or :program:`mongod` cannot connect
to instance.

- the :program:`mongos` or :program:`mongod` received a
connection exception or error.

This field is for internal use.

.. data:: connPoolStats.replicaSets.[shard].host[n].ismaster

:data:`~connPoolStats.replicaSets.[shard].host[n].ismaster` reports ``true``
if this :data:`~connPoolStats.replicaSets.[shard].host` is the
:term:`primary` member of the :term:`replica set`.

.. data:: connPoolStats.replicaSets.[shard].host[n].hidden

:data:`~connPoolStats.replicaSets.[shard].host[n].hidden` reports ``true``
if this :data:`~connPoolStats.replicaSets.[shard].host` is a :term:`hidden
member` of the :term:`replica set`.

.. data:: connPoolStats.replicaSets.[shard].host[n].secondary

:data:`~connPoolStats.replicaSets.[shard].host[n].secondary` reports
``true`` if this :data:`~connPoolStats.replicaSets.[shard].host` is a
:term:`secondary` member of the :term:`replica set`.

.. data:: connPoolStats.replicaSets.[shard].host[n].pingTimeMillis

:data:`~connPoolStats.replicaSets.[shard].host[n].pingTimeMillis` reports
the ping time in milliseconds from the :program:`mongos` or
:program:`mongod` to this :data:`~connPoolStats.replicaSets.[shard].host`.

.. data:: connPoolStats.replicaSets.[shard].host[n].tags

.. versionadded:: 2.2

:data:`~connPoolStats.replicaSets.[shard].host[n].tags` reports the
:data:`~local.system.replset.members[n].tags`, if this member of the set has tags
configured.

.. data:: connPoolStats.replicaSets.[shard].master

:data:`~connPoolStats.replicaSets.[shard].master` reports the ordinal identifier
of the host in the :data:`~connPoolStats.replicaSets.[shard].host` array that is
the :term:`primary` of the :term:`replica set`.

.. data:: connPoolStats.replicaSets.[shard].nextSlave

.. deprecated:: 2.2

:data:`~connPoolStats.replicaSets.[shard].nextSlave` reports the
:term:`secondary` member that the :program:`mongos` will use to
service the next request for this :term:`replica set`.

.. data:: connPoolStats.createdByType

:data:`~connPoolStats.createdByType` :term:`document` reports the number of each
type of connection that :program:`mongos` or :program:`mongod` has created in all
connection pools.

:program:`mongos` connect to :program:`mongod` instances using one
of three types of connections. The following sub-document reports
the total number of connections by type.

.. data:: connPoolStats.createdByType.master

:data:`~connPoolStats.createdByType.master` reports the total number of
connections to the :term:`primary` member in each :term:`cluster`.

.. data:: connPoolStats.createdByType.set

:data:`~connPoolStats.createdByType.set` reports the total number of
connections to a :term:`replica set` member.

.. data:: connPoolStats.createdByType.sync

:data:`~connPoolStats.createdByType.sync` reports the total number of
:term:`config database` connections.

.. data:: connPoolStats.totalAvailable

:data:`~connPoolStats.totalAvailable` reports the running total of connections
from the :program:`mongos` or :program:`mongod` to all :program:`mongod` instances in
the :term:`sharded cluster` available for use.

.. data:: connPoolStats.totalCreated

:data:`~connPoolStats.totalCreated` reports the total number of connections ever
created from the :program:`mongos` or :program:`mongod` to all :program:`mongod`
instances in the :term:`sharded cluster`.

.. data:: connPoolStats.numDBClientConnection

:data:`~connPoolStats.numDBClientConnection` reports the total number of
connections from the :program:`mongos` or :program:`mongod` to all of the :program:`mongod`
instances in the :term:`sharded cluster`.

.. data:: connPoolStats.numAScopedConnection

:data:`~connPoolStats.numAScopedConnection` reports the number of exception safe
connections created from :program:`mongos` or :program:`mongod` to all :program:`mongod`
in the :term:`sharded cluster`. The :program:`mongos` or :program:`mongod` releases these
connections after receiving a socket exception from the
:program:`mongod`.
174 changes: 0 additions & 174 deletions source/reference/connection-pool-stats.txt

This file was deleted.