This chapter provides an introduction to Coherence management features. Coherence management is implemented using Java Management Extensions (JMX). JMX is a Java standard for managing and monitoring Java applications and services. Refer to the following article for details on JMX:
The following sections are included in this chapter:
Coherence provides a JMX framework to manage clusters. The framework relies on one or more cluster members that are configured to host an MBean server. The MBean servers are responsible for managing the managed objects of all the other cluster members. The framework allows access to management information from any cluster member and is fault tolerant should a JMX member fail. The management framework is disabled by default and must be explicitly enabled by configuring at least one cluster member to host an MBean server. See Chapter 2, "Using JMX to Manage Coherence," for more information on enabling JMX management in Coherence.
Coherence managed objects are registered to an MBean server using the
com.tangosol.net.management.Registry interface. The interface is specific to managing Coherence clustered resources and is an abstraction of the basic JMX registration APIs. Though the interface is closely related to the JMX infrastructure, it is independent from
javax.management.* classes. The interface enables remote management support for cluster members that are not collocated with any JMX services and allows Coherence MBeans to be registered in an MBean server that is either collocated or remote in relation to the managed object.
Appendix A, "Coherence MBeans Reference," provides a list of all Coherence MBeans and describes each of the attributes and operations that are exposed for the managed resources. Some managed resources only have a single instance for each cluster member; while, some managed resources (such as the
CacheMBean MBean) may have multiple MBean instances for each cluster member. In addition, an MBean is only registered if there is at least one managed resource operational. In the case of the
CacheMBean MBean, a cache must be started before the MBean is registered.
Coherence provides the ability to manage and monitor custom MBeans within the management framework. Custom MBeans are any dynamic or standard MBeans that are specific to an application. The MBeans are registered either declaratively in an XML file or programmatically using the
Registration interface. This allows an application's MBeans to be managed or monitored from any JVM, member, or end-point within the cluster. See Chapter 3, "Registering Custom MBeans," for more information on registering custom MBeans.
Any MBean-capable console can interact with Coherence MBeans. Coherence includes support for both the Java Management & Monitoring Console (jconsole) that is distributed with the JDK and the JMX HTTPAdapter Web application that is included as part of the JMX reference implementation. See "Accessing Coherence MBeans" for more information on using these consoles to interact with Coherence MBeans.
The Coherence Reporter provides management reports that are used to view management information over time. The reports are text files that are constructed from data that is obtained from the Coherence MBeans. The reports are automatically updated at a configured time interval and provide a historical context that is not possible simply by monitoring the MBeans. The reports are most often used to identify trends that are valuable for troubleshooting and planning.
Coherence includes many predefined reports out-of-box. The reports can be customized or new reports can be created as required. Reporting functionality is disabled by default and must be explicitly enabled. In addition, only a subset of the reports are initially configured to be generated. See Chapter 4, "Using JMX Reporting," for details on enabling reporting in Coherence. Also, see Chapter 6, "Analyzing Reporter Content," for detailed information on the predefined reports.
Coherence management is configured using several configuration files. See Oracle Coherence Developer's Guide for detailed information on Coherence configuration. The files include:
Operational Override File – The
tangosol-coherence-override.xml file is used to override the operational deployment descriptor, which is used to specify the operational and run-time settings that are used to create, configure and maintain clustering, communication, and data management services. The management settings are defined within the
<management-config> node. See Oracle Coherence Developer's Guide for more information on the available settings for management.
MBean Configuration Override File – The
custom-mbeans.xml file is the default MBean configuration override file and is used to declaratively define custom MBeans. Custom MBeans can also be defined within the operational override file. However, the MBean configuration override file is typically used instead.
report configuration files – A set of report configuration files that each results in the creation of a report file that displays management information for a particular set of metrics. Report configuration files must be referenced in a report group configuration file to be used at run time. The default report configuration files are located in the
/reports directory of the
coherence.jar and are referenced by the default report group configuration file. Custom report configuration files can be created as required. See Appendix B, "Report File Configuration Reference," for details about the report file configuration elements.
report group configuration file – A report group configuration file is used to list the name and location of report definition files and the output directory where reports are written. The name and location of this file is defined in the operational deployment descriptor. By default, the
report-group.xml file is used and is located in the
/reports directory of the
coherence.jar. Additional report group configuration file are provided and custom report group files can be created as required. See Appendix C, "Report Group Configuration Reference," for details about the report group configuration elements.
management-config.xml – The management configuration file is used to configure the management invocation service instance that is used by the Coherence JMX management framework. The file is located in the root of the
coherence.jar file and can be overridden by placing a
management-config.xml file in the classpath before the
coherence.jar file. This configuration file is not defined by an XSD. The file must have a
<config> root element and supports the same subelements that are available for an
<invocation-scheme> element. The management configuration file settings are not typically modified and it is generally recommended to leave the default settings.
Oracle Enterprise Manager Grid Control includes the Management Pack for Oracle Coherence, which is used to manage and monitor Coherence clusters. The management pack helps administrators pro-actively monitor the performance of their Coherence clusters and reduces the time needed to identify and diagnose performance problems within their application environments. The key benefits include:
Manage complexity by modeling the entire cluster as a single target
Real-time and historical performance monitoring for caches and nodes for faster diagnostics and resolution times
Monitor caches in context of applications to analyze dependency
Proactive monitoring using thresholds and alerts
Reduce risk using automated provisioning and lifecycle management
Change run-time configuration to quickly tune cache performance
Oracle Enterprise Manager Grid Control, which includes the Management Pack for Oracle Coherence, can be downloaded from OTN:
See the Getting Started Guide for Oracle Coherence in the Oracle Enterprise Manager Documentation Library for detailed instructions on configuring and using the management pack.