eG Database Connections Test

To optimize accesses to the database, the eG manager uses connection pooling. By using a pre-established set of connections and multiplexing requests over these connections, the eG manager ensures that individual connections are not established and closed for each request. Using the eG administrative interface, an administrator can configure the initial number of connections in the pool and the maximum number of connections. If the pool has not been configured with enough connections, then the eG manager may not be able to connect to the database to store the critical performance metrics reported by the eG agents.  Therefore, to be able to judge the adequacy of this configuration, you need to understand how the eG manager uses the connection pool. The eG Database Connections test sheds light on the usage of the connection pool by the eG manager, and indicates whether/not the connection pool has been rightly sized.

Target of the test : The eG Manager

Agent deploying the test : An internal/remote agent

Outputs of the test : One set of results for the eG manager being monitored.

Configurable parameters for the test
Parameter Description

Test period

How often should the test be executed .

Host

The host for which the test is to be configured.

Port

The port number at which the specified host listens.

JMX Remote Port

Here, specify the port at which the JMX listens for requests from remote hosts. In the <EG_MANAGER_INSTALL_DIR>\manager directory (on Windows; on Unix, this will be the /opt/egurkha/manager directory) of the eG manager, you will find a management.properties file. Set the port defined against the com.sun.management.jmxremote.port parameter of the file as the JMX Remote Port.

User, Password, and Confirm Password

By default, JMX requires no authentication or security. Therefore, the User, Password , and Confirm Password parameters are set to none by default.

JNDIName

The JNDIName is a lookup name for connecting to the JMX connector. By default, this is jmxrmi. If you have registered the JMX connector in the RMI registry using a different lookup name, then you can change this default value to reflect the same.

JMX Provider

This test uses a JMX Provider to access the MBean attributes of the eG manager and collect metrics. Specify the package name of this JMX Provider here. By default, this is set to com.sun.jmx.remote.protocol.

Timeout

Specify the duration (in seconds) for which this test should wait for a response from the eG manager. If there is no response from the eG manager beyond the configured duration, the test will timeout. By default, this is set to 240 seconds.

Detailed Diagnosis

To make diagnosis more efficient and accurate, the eG Enterprise suite embeds an optional detailed diagnostic capability. With this capability, the eG agents can be configured to run detailed, more elaborate tests as and when specific problems are detected. To enable the detailed diagnosis capability of this test for a particular server, choose the On option. To disable the capability, click on the Off option.

The option to selectively enable/disable the detailed diagnosis capability will be available only if the following conditions are fulfilled:

  • The eG manager license should allow the detailed diagnosis capability
  • Both the normal and abnormal frequencies configured for the detailed diagnosis measures should not be 0.
Measurements made by the test
Measurement Description Measurement Unit Interpretation

Initial connections

Indicates the number of initial connections allocated to the pool.

Number

Both these parameters can be configured using the database settings page that appears when the Configure -> Data Management -> Database Settings menu sequence is followed in the eG administrative interface. Consider increasing the number of connections in the connection pool as the number of components monitored or the number of users accessing the system increases.

Maximum connections

Indicates the maximum number of database connections that the eG manager can use from the pool.

 

Number

Used connections

Indicates the number of connections currently used by the eG manager.

Number

If the value of this measure grows dangerously close to the value of the Maximum connections measure, it indicates that the pool is rapidly running out of connections. In such a case, you can use the detailed diagnosis  of this measure to know which classes are currently utilizing the database connections, and how many connections have been used per class. Classes that are over-utilizing database connections can thus be identified, and the reasons for the same can be determined.  

Free connections

Indicates the time taken for connections to time out.

Number

A low value for this measure is a cause for concern, as it indicates that the connection pool does not have enough free connections. This could be owing to an increase in the number of components monitored or the number of users accessing the systems. You may hence want to consider fine-tuning the Initial Connections and Maximum Connections parameters (using the eG administrative interface), so that the pool is sufficiently sized to handle the increase in workload. 

Connection timeout

Indicates the time taken for connections to time out.

Secs

By carefully observing the value for this measure over time, you can figure out the maximum ideal time for which a connection should stay alive.

Total connections

Indicates the total number of connections in the pool.

 

Number

 

Connections waiting

Indicates the number of connections that are currently waiting to be closed on the eG manager.

Number

Ideally, the value of this measure should be low. A very high value of this measure is a cause for concern as it indicates that too many connections to the database are currently open and are waiting to be closed, but are unable to close owing to certain issues. Besides unnecessarily consuming connections from the pool and causing a paucity of connections in the pool, these waiting connections, if allowed to increase, can even cause the manager to restart.

The detailed diagnosis of the Used connections measure lists the eG manager classes that are using connections from the database connection pool, and the number of connections each class is using. Classes that are consuming too many connections can thus be identified and the reasons for this abnormal usage can be investigated.

DDegdbconnectiontest

Figure 1 : The detailed diagnosis of the Used connections measure