Monitoring the Dynamic LDAP connection pool

Configuring the Dynamic LDAP connection pool

On this page

Still need help?

The Atlassian Community is here for you.

Ask the community

The Dynamic LDAP connection pool is an alternative to the JNDI LDAP connection pool and can be enabled for each directory separately. This page explains how you can monitor the pool statistics for each directory. For more info on the connection pool and how to enable it, see Configuring the Dynamic LDAP connection pool.

You can monitor the Dynamic LDAP connection pool in two ways:

  • Using the REST endpoint to quickly view live statistics

  • Configuring a monitoring tool to view additional Java Management Extensions (JMX) metrics to the info provided by the REST endpoint

Monitor the pool using the REST API

REST API is a quick and easy way to view the live status of the pool. For more info on the related REST endpoint, see Dynamic LDAP pool statistics.

Monitor the pool using the JMX interface

The JMX interface provides more detailed statistics for the pool. To use it, you’ll need to configure an additional tool to access the JMX metrics. In this example, we’ve used the free Java Mission Control.

tip/resting Created with Sketch.

What is JMX?

JMX (Java Management Extensions) is a technology used to monitor and manage Java applications. JMX uses objects called MBeans (Managed Beans) to expose data and resources from an application or one of its components.


Configure Java Mission Control

Before you begin:

  • Java Mission Control requires Java Runtime Environment (JRE) 11 or later.

  • You will have to enable JMX on each of the your Crowd nodes.

To install and use Java Mission Control:

  1. Download Java Mission Control and install it.

  2. Once you start Java Mission Control, you should see the following screen:

  3. Right-click on the server you want to connect to, and select Start the JMX Console. The following screen will appear: 
  4. Select the MBean Browser tab at the bottom. 
  5. In the navigation tree, find the org.apache.commons.pool2 directory and expand it. You’ll see an entry for each directory that uses the Dynamic LDAP connection pool. 
  6. The Attributes tab shows the JMX metrics for the selected directory, together with additional parameters that that describe the status of the pool. You can read more about them in the table below.

Dynamic LDAP pool metrics

The following table shows the JMX metrics provided for each Dynamic LDAP connection pool.

Objects mentioned in the description of each metric represent one or more connection slots in the pool.

MetricDescription
BorrowedCountThe total number of objects successfully borrowed from the pool. Measured over the pool’s lifetime.
CreatedCountThe total number of objects created for the pool. Measured over the pool’s lifetime.
DestroyedByBorrowValidationCountThe total number of objects destroyed by the pool as a result of failing validation when being borrowed. Measured over the pool’s lifetime.
DestroyedByEvictorCountThe total number of objects destroyed by the evictor associated with the pool. Measured over the pool’s lifetime.
DestroyedCountThe total number of objects destroyed by the pool. Measured over the pool’s lifetime.
MaxBorrowWaitTimeMillisThe maximum time a thread has waited to borrow objects from the pool.
MeanActiveTimeMillisThe mean time an object is active in the pool, calculated considering all the values stored in the statistics' cache which can store up to 100 values.
MeanBorrowWaitTimeMillisThe mean time that a recently served thread needed to wait to borrow an object from the pool, calculated considering all the values stored in the statistics' cache which can store up to 100 values.
MeanIdleTimeMillisThe mean time an object has been idle in the pool among, calculated considering all the values stored in the statistics' cache which can store up to 100 values.
Last modified on Nov 18, 2022

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.