JVM File Descriptors Test

This test reports useful statistics pertaining to file descriptors.

Note:

This test will work only if the target Java application uses the JDK/JRE offered by one of the following vendors only: Oracle, Sun, OpenJDK. IBM JDK/JRE is not supported.

Target of the test : A Java application

Agent deploying the test : An internal/remote agent

Outputs of the test : One set of results for the Java application 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 to.

Metric Collection Type

This test can extract metrics from the Java application using one of the following mechanisms:

  • Using the eg_btm.jar file available in the <eG_INSTALL_DIR>\lib\apm\java\default folder;
  • By contacting the Java runtime (JRE) of the application via JMX

To configure the test to collect metrics from the eg_btm.jar file, select the JAR option. On the other hand, to configure the test to use JMX for metrics collection, choose the JMX option. By default, JAR option is chosen here.

Note:

This test will not report metrics for a Spring Boot application, if the Metric Collection Type is set to JAR. In this case therefore, you need to explicitly follow the steps detailed in Enabling JVM Monitoring for Spring Boot Application Using eG Java BTM to make sure that this test runs and collects the desired JVM metrics for the target application.

JMX Remote Port

This parameter appears only if the Mode is set to JMX. Here, specify the port at which the JMX listens for requests from remote hosts. Ensure that you specify the same port that you configured in the management.properties file in the <JAVA_HOME>\jre\lib\management folder used by the target application . To know more, refer to Enabling JMX Support for JREtopic.

JNDI Name

This parameter appears only if the Mode is set to JMX. The JNDIname is a lookup name for connecting to the JMX connector. By default, this is jmxrmi. If you have resgistered the JMX connector in the RMI registery using a different lookup name, then you can change this default value to reflect the same. 

JMX User, JMX Password, and Confirm password

These parameters appear only if the Mode is set to JMX. If JMX requires authentication only (but no security), then ensure that the user and password parameters are configured with the credentials of a user with read-write access to JMX. To know how to create this user, refer to Configuring the eG Agent to Support JMX Authentication. Confirm the password by retyping it in the Confirm Password text box.

Provider

This parameter appears only if the Mode is set to JMX. This test uses a JMX Provider to access the MBean attributes of the target Java application 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 target Java application. If there is no response from the target beyond the configured duration, the test will timeout. By default, this is set to 240 seconds if the Mode is JMX, and 10 seconds if the Mode is SNMP.

JMX Registry SSL

This parameter appears only if the Mode is set to JMX. If you have configured the JMX agent to use SSL/TLS encryption for its underlying RMI (Remote Method Invocation) registry, then set this flag to Yes. To check if the RMI registry is SSL-enabled, then, do the following:

  • Login to the target Java application's host.

  • Open the management.properties file in the <JAVA_HOME>\jre\lib\management directory.

  • Look for the following Java argument in the file:

    com.sun.management.jmxremote.registry.ssl

  • If this argument is set to true, then it implies that the RMI registry is SSL-enabled.

  • Alternatively, you can open the startup script of the target application, and look for the following argument instead:

    -Dcom.sun.management.jmxremote.registry.ssl

    If this argument is set to true, then its a clear indicator that the RMI registry is SSL-enabled.

  • Either way, in such a case, set the JMX Registry SSL flag to Yes. On the other hand, if the arguments mentioned above are set to false, then set the JMX Registry SSL flag to No.

Measurements made by the test
Measurement Description Measurement Unit Interpretation

Open file descriptors in JVM

Indicates the number of file descriptors currently open for the application.

Number

 

Maximum file descriptors in JVM

Indicates the maximum number of file descriptors allowed for the application.

Number

 

File descriptor usage by JVM

Indicates the file descriptor usage in percentage.

Percent