Java Virtual Machine

Overview

This document describes how to collect JMX metrics exposed by Java applications for long-term retention and monitoring in Axibase Time Series Database.

This integration enables both performance monitoring (garbage collection, load, threads, heap/offheap memory), availability monitoring (system uptime counter), as well as configuration tracking by notifying any changes in the system properties.

Requirements

  • JRE/JDK 6+

Installation Steps

Enable JMX in Java Application

Configure your Java application for JMX data collection as described here.

Import JVM Job into Axibase Collector

Configure JMV JMX Connection

  • Open the Jobs:JMX page and select the jmx-jvm job.
  • For each JMX Configuration:
  • Provide connection parameters to the target JVM:

  • Click the [Test] button:

Schedule the Job

  • Open the JMX Job page and click the [Run] button for the JVM JMX job.
  • Make sure that the job status is COMPLETED and Items Read and Sent commands are greater than 0.

  • If there are no errors, set the job status to 'Enabled' and save the job.

Verify Metrics in ATSD

  • Log in to ATSD.
  • Click on Metrics tab and filter metrics by name jmx.jvm*.

Viewing Data in ATSD

Metrics

Properties

Entity group

  • Open Admin:Entity Groups, click the [Import] button, and upload jvm_entity_group.xml.
  • Select the imported java-virtual-machine group.
  • Verify that the group contains your JVM hosts.

Entity Views

  • Open Configuration:Entity Views, click the [Import] button, and upload jvm_entity_view.xml.
  • Select the imported Java Applications view.
  • Select the Entity Group that you created earlier.
  • Click on the [View] button and browse information about your entities:

Portal

  • Open Configuration: Portals, click the [Import] button, and upload jvm_portal.xml.
  • Click the Assign link and associate the portal with the entity group you created earlier.
  • Open the Entity tab, find the java application by name, and click on its portal icon:

JVM Live Portal

Rules

Setting up Mail Client

Import Rules

  • Open the Configuration: Rules page, click the [Import] button, and upload jvm_rules.xml.
  • For each created rule: open it in the Rule Editor and change recipient address on the Email Notifications tab.
  • These rules will automatically apply to all JVM based applications monitored by Axibase Collector.

Imported rules:

RuleDescription
jvm_application_restartRaise an alert when an application has been restarted less than 5 minutes ago.
jvm_cpu_loadRaise an alert when an application cpu load exceeds the set threshold.
jvm_garbage_collection_rateRaise an alert when an application Garbage Collector rate exceeds the set threshold.
jvm_garbage_collection_timeRaise an alert when an application Garbage Collector time exceeds the set threshold.
jvm_heap_memory_usageRaise an alert when an application heap memory usage exceeds the set threshold.
jvm_runtime_property_changedRaise an alert when an application property is changed.
jvm_system_loadRaise an alert when an application system load exceeds the set threshold.

To create your own rules, refer to Rule Engine documentation.