JMX technology (Java Management Extensions) is ideal for monitoring applications built using Java technology. With Dynatrace JMX monitoring plugins, you can monitor any metric in your JVM that is exposed via an MBean.
Create a JMX plugin
You need to create a JSON file that describes your JMX metrics and how you want to display them. For complete instructions and examples, visit the Dynatrace GitHub page.
Upload a JMX plugin
- To add a JMX plugin to Dynatrace, go to Settings > Monitored technologies > Custom plugins and click Upload plugin.
- Select the
plugin.jsonfile of your JMX plugin.
Once successfully uploaded, your plugin is listed on the Custom plugins page. You don't need to restart your JVM to enable JMX plugins or make changes effective.
Note: If in the future you make changes to your plugin, remember to upload the updated
plugin.jsonfile to Dynatrace.
Viewing JMX metrics in Dynatrace
JMX metrics are available for all Java-based processes monitored by OneAgent.
Once your plugin is uploaded, Dynatrace automatically begins querying the defined metrics for all Java processes. These metrics are displayed on each relevant process page. If you've defined key metrics, you'll see those metrics included in the infographic. If you defined key charts you'll see the charts displayed in an aggregate form beneath the infographic (see the HornetQ example below).
Click the Further details tab to see all defined metrics. As described on the Dynatrace GitHub page, Dynatrace allows you to select any MBean's key property as a dimension. The queue name property was selected for the example below. This way you can select a metric like the queue depth and get it listed for each queue instead of simply getting an aggregate value.
JMX monitoring is highly dynamic. If a particular metric doesn’t exist in your JVM, it's not an error—the metric simply isn't available.