- Reference
- Management
- Monitoring
Monitoring
The driver uses JMX to create MXBeans that allow an application or end user to monitor various aspects of the driver.
The driver creates MXBean instances of a single type:
ConnectionPoolStatisticsMBean.
The driver registers one ConnectionPoolStatisticsMBean
instance per each server it connects to. For example, in the case of a replica
set, the driver creates an instance per each non-hidden member of the replica set.
Each MXBean instance is required to be registered with a unique object name, which consists of a domain and a set of named properties. All
MXBean instances created by the driver are under the domain "org.mongodb.driver"
. Instances of ConnectionPoolStatisticsMBean
will have
the following properties:
clusterId
: a client-generated unique identifier, required to ensure object name uniqueness in situations where an application has multipleMongoClient
instances connected to the same MongoDB server deploymenthost
: the host name of the serverport
: the port on which the server is listeningminSize
: the minimum allowed size of the pool, including idle and in-use membersmaxSize
: the maximum allowed size of the pool, including idle and in-use memberssize
: the current size of the pool, including idle and and in-use memberswaitQueueSize
: the current size of the wait queue for a connection from this poolcheckedOutCount
: the current count of connections that are currently in use
On this page