WHERE DO I START?
You are here:Integrations > Java

Java

Netuitive's Java agent is a java monitoring agent with a programmable bytecode instrumentation engine that's enabled by adding a JVM integration in Netuitive. The Netuitive Java integration allows Netuitive to collect JVM runtime system metrics like CPU, Memory, GC, Threads and Classes Count, and application components method performance statistics, such as number of calls and execution time.

Java Integration Options

We have several different options for monitoring Java applications. Each method varies in terms of setup difficulty and the amount / type of information it collects. See the table below for more information.

Method Description
Ananke

Java library you can use to push metrics to the StatsD listener embedded in our Linux agent.

Important   This approach requires that you integrate the StatsDReporter into your applications.
Dropwizard

Integrate the dropwizard-metrics library into your Dropwizard application and either configure it to send metrics to the StatsD listener embedded in our Linux agent or directly to Netuitive's REST API.

Iris Java library you can use to push metrics directly to Netuitive's REST API.
Java Agent Open-source and open-license Java agent the does the byte-code instrumentation for you. No changes to source code required.
JMX Integration that relies on our Linux agent to collect JVM metrics (e.g., heap size, garbage collection, etc.) without code-level instrumentation.

Dependencies

Miscellaneous

Java 6+

Configuration

Note   If you need to disable an existing Java integration or view the unique API key assigned to your account, navigate to the Integrations page under the user account drop-down menu and click the integration designated as Java under the Integration column.

Additional Configuration Options

Configuring the Java agent for Custom MBeans

The Java agent can collect metrics from custom mbeans. We have provided a sample spring boot application that creates 2 custom mbeans with test attributes here.

Multiple Custom Mbean Diagram

For a single custom mbean:

  1. Navigate to the zorka.properties file in your Java agent directory.
  2. Near the bottom of the file, set the attribute netuitive.api.custom.stats.mbean to the custom mbean you defined in your application.
    #custom mbean to collect metrics from
    netuitive.api.custom.stats.mbean = com.netuitive.mbean:type=Test,name=CustomTestMBean
    Note   Leave the netuitive.api.custom.stats.mbean.attr.include attribute blank to include all metrics.
  3. Save the file.

For multiple mbeans:

Note    We've provided a sample .bsh script that creates getter objects for each of the mbeans in the sample multiple mbean spring boot application file.
  1. Create a .bsh script that contains getter objects for each of your custom mbean values. In the same script, create a rollup mbean and add the getter objects you created in step 1 as attributes of the rollup mbean.
  2. Navigate to the zorka.properties file in your Java agent directory.
  3. Add the script you created in step 1 to the scripts setting.
    #Default collection of jvm metrics
    scripts = jvm.bsh, custom-mbean.bsh
  4. Near the bottom of the file, set the attribute netuitive.api.custom.stats.mbean to the new rollup mbean you created in step 2.
    #custom mbean to collect metrics from
    netuitive.api.custom.stats.mbean = com.netuitive.mbean:type=Test,name=RollupTestMBean
    Note   Leave the netuitive.api.custom.stats.mbean.attr.include attribute blank to include all metrics.
  5. Save the file.

Metrics

Note   In the following tables, the BASE column indicates whether there's a baseline band available for the metric, the CORR column indicates whether there's a contextual band available for the metric, and the UTIL column indicates whether the metric can be used as a utilization metric in the Utilization and Utilization Boxplot Reports.

Additional Information