-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Conn pool stats #65
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
Conn pool stats #65
Changes from all commits
788235b
9f1969c
2e95415
9870565
807c33f
7c8a346
6c45566
bef3d74
d6d7261
9f119e0
e6c65ff
add340f
1c02e52
91d616f
b482f3f
f7ce1ed
e376e03
0fc5de3
03ef0b8
cbaddf4
055d642
ec43c21
21b1b6c
ff15ad1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.. note:: | ||
|
||
:dbcommand:`connPoolStats` only returns meaningful results for | ||
:program:`mongos` instances and for :program:`mongod` instances | ||
in shard clusters. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,176 @@ | ||
==================================== | ||
Connection Pool Statistics Reference | ||
==================================== | ||
|
||
.. default-domain:: mongodb | ||
|
||
Synopsis | ||
-------- | ||
|
||
:program:`mongos` instances maintain a pool of connections for | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. mongod instances do this also. They also have connections to all the other shards, for use in migrations. |
||
interacting with constituent members of the :term:`shard clusters | ||
<shard cluster>`. Additionally, :program:`mongod` instances maintain | ||
connection with other shards in the cluster for migrations. The | ||
:dbcommand:`connPoolStats` command returns statistics regarding these | ||
connections between the :program:`mongos` and :program:`mongod` | ||
instances or between the :program:`mongod` instances in a shard | ||
cluster. | ||
|
||
.. include:: /includes/note-conn-pool-stats | ||
.. | ||
Output | ||
------ | ||
|
||
.. stats:: hosts | ||
|
||
The sub-documents of the :stats:`hosts` :term:`document` report connections | ||
between the :program:`mongos` or :program:`mongod` instance and each component | ||
:program:`mongod` of the :term:`shard cluster`. | ||
|
||
.. stats:: hosts.[host].available | ||
|
||
:stats:`hosts.[host].available` reports the total number of | ||
connections that the :program:`mongos` or :program:`mongod` | ||
could use to connect to this :program:`mongod`. | ||
|
||
.. stats:: hosts.[host].created | ||
|
||
:stats:`hosts.[host].created` reports the number of connections | ||
that this :program:`mongos` or :program:`mongod` has ever created for this host. | ||
|
||
.. stats:: replicaSets | ||
|
||
:stats:`replicaSets` is a :term:`document` that contains | ||
:term:`replica set` information for the :term:`shard cluster`. | ||
|
||
.. stats:: replicaSets.shard | ||
|
||
The :stats:`replicaSets.shard` :term:`document` reports | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think the field name is actually hosts, not host |
||
on each :term:`shard` within the :term:`shard cluster` | ||
|
||
.. stats:: replicaSets.[shard].host | ||
|
||
The :stats:`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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be replicaSets.[shard].hosts[i].addr Not sure what you should write for i, it's just an index in the array... |
||
</reference/replica-status>` values. | ||
|
||
.. stats:: replicaSets.[shard].host[n].addr | ||
|
||
:stats:`replicaSets.[shard].host[n].addr` reports the address | ||
for the host in the :term:`shard cluster` in the format of | ||
"``[hostname]:[port]``". | ||
|
||
.. stats:: replicaSets.[shard].host[n].ok | ||
|
||
:stats:`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. | ||
|
||
.. stats:: replicaSets.[shard].host[n].ismaster | ||
|
||
:stats:`replicaSets.[shard].host[n].ismaster` reports ``true`` | ||
if this :stats:`replicaSets.[shard].host` is the | ||
:term:`primary` member of the :term:`replica set`. | ||
|
||
.. stats:: replicaSets.[shard].host[n].hidden | ||
|
||
:stats:`replicaSets.[shard].host[n].hidden` reports ``true`` | ||
if this :stats:`replicaSets.[shard].host` is a :term:`hidden | ||
member` of the :term:`replica set`. | ||
|
||
.. stats:: replicaSets.[shard].host[n].secondary | ||
|
||
:stats:`replicaSets.[shard].host[n].secondary` reports | ||
``true`` if this :stats:`replicaSets.[shard].host` is a | ||
:term:`secondary` member of the :term:`replica set`. | ||
|
||
.. stats:: replicaSets.[shard].host[n].pingTimeMillis | ||
|
||
:stats:`replicaSets.[shard].host[n].pingTimeMillis` reports | ||
the ping time in milliseconds from the :program:`mongos` or | ||
:program:`mongod` to this :stats:`replicaSets.[shard].host`. | ||
|
||
.. stats:: replicaSets.[shard].host[n].tags | ||
|
||
.. versionadded:: 2.2 | ||
|
||
:stats:`replicaSets.[shard].host[n].tags` reports the | ||
:data:`members[n].tags`, if this member of the set has tags | ||
configured. | ||
|
||
.. stats:: replicaSets.[shard].master | ||
|
||
:stats:`replicaSets.[shard].master` reports the ordinal identifier | ||
of the host in the :stats:`replicaSets.[shard].host` array that is | ||
the :term:`primary` of the :term:`replica set`. | ||
|
||
.. stats:: replicaSets.[shard].nextSlave | ||
|
||
.. deprecated:: 2.2 | ||
|
||
:stats:`replicaSets.[shard].nextSlave` reports the | ||
:term:`secondary` member that the :program:`mongos` will use to | ||
service the next request for this :term:`replica set`. | ||
|
||
.. stats:: createdByType | ||
|
||
:stats:`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. | ||
|
||
.. stats:: createdByType.master | ||
|
||
:stats:`createdByType.master` reports the total number of | ||
connections to the :term:`primary` member in each :term:`shard | ||
cluster`. | ||
|
||
.. stats:: createdByType.set | ||
|
||
:stats:`createdByType.set` reports the total number of | ||
connections to a :term:`replica set` member. | ||
|
||
.. stats:: createdByType.sync | ||
|
||
:stats:`createdByType.sync` reports the total number of | ||
:term:`config database` connections. | ||
|
||
.. stats:: totalAvailable | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That are in the pools, available for use. Does not include connections that are currently being used as those are not in the pool. |
||
:stats:`totalAvailable` reports the running total of connections | ||
from the :program:`mongos` or :program:`mongod` to all :program:`mongod` instances in | ||
the :term:`shard cluster` available for use. This value does not | ||
reflect those connections that | ||
|
||
.. stats:: totalCreated | ||
|
||
:stats:`totalCreated` reports the total number of connections ever | ||
created from the :program:`mongos` or :program:`mongod` to all :program:`mongod` | ||
instances in the :term:`shard cluster`. | ||
|
||
.. stats:: numDBClientConnection | ||
|
||
:stats:`numDBClientConnection` reports the total number of | ||
connections from the :program:`mongos` or :program:`mongod` to all of the :program:`mongod` | ||
instances in the :term:`shard cluster`. | ||
|
||
.. stats:: numAScopedConnection | ||
|
||
:stats:`numAScopedConnection` reports the number of exception safe | ||
connections created from :program:`mongos` or :program:`mongod` to all :program:`mongod` | ||
in the :term:`shard cluster`. The :program:`mongos` or :program:`mongod` releases these | ||
connections after receiving a socket exception from the | ||
:program:`mongod`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for full documentation of all conn pool status? Did you mean of all arguements for connPoolStats?