AppDynamics Knowledge Base

Garbage Collection metrics are not reporting. What should I do?

Garbage Collection metrics are not reporting. What should I do?

Issue 

On some of your JVM environments, Garbage Collection (GC) metrics are not reporting out of the box.

Observations

The agent collects and reports the GC metrics based on the related MBeans exposed by the underlying JVM. If the JVM does not return the related Mbeans, then GC metrics will not be reported by the agent.

In this case, the agent logs will report the messages below: 

[Thread-0] 06 Feb 2018 07:06:23,529  WARN MemoryMetricGenerator - Current JVM GC MX Beans - GPGC New, GPGC Old,  not registered with JMX Service.Please add the appropriate minor collection bean name to JMX Service property key name : jmx-gc-minorCollectionBean

[Thread-0] 06 Feb 2018 07:06:23,529  WARN MemoryMetricGenerator - Current JVM GC MX Beans - GPGC New, GPGC Old,  not registered with JMX Service.Please add the appropriate major collection bean name to JMX Service property key name : jmx-gc-minorCollectionBean

Solution 1

You will need to analyze the GC mechanisms used by the JVM by verifying with JConsole or any other JMX tool. Refer to the attached screenshots for an example. 

Identify the GC mechanism and configure it in the "app-agent-config.xml" file under "JMXService" configurations.

Example:

 <agent-service name="JMXService" enabled="true">
<configuration-properties>
<property name="jmx-gc-minorCollectionBean" value="PS MarkSweep"/>
<property name="jmx-gc-majorCollectionBean" value="PS MarkSweep"/>
<property name="jmx-server-metrics-update-interval-in-seconds" value="60"/>
</configuration-properties>

Restart the JVM for the changes to take effect.

Solution 2

You can create custom JMX metrics as follows, although you may need to use the JMX browser to confirm the exact names.

image.pngMinor Collection

image.pngMajor Collection

Labels (1)
Attachments
Comments

Is it possible to edit these settings in the node properties instead of the app config file? 

Hi Jack,

  Thanks for the update.

   Yes , you can use below node properties for the same.

jmx-gc-minorCollectionBean

jmx-gc-majorCollectionBean

Thanks

Naren

Version history
Last update:
‎08-20-2018 05:31 PM
Updated by: