The Coherence-VisualVM Plugin (the Plugin) provides management and monitoring of a single Coherence cluster using the VisualVM management utility.
The Plugin aggregates Coherence MBean data and shows a concise operational view of a single Coherence cluster. Some management information is presented over time, which allows real-time analysis and troubleshooting. You can connect to clusters via JMX or via management over REST with Coherence versions 12.2.1.4 or above.
The Plugin is an ideal tool for monitoring and managing Coherence clusters during the development and testing lifecycle and supports connecting to both Community Edition and Commercial versions of Coherence.
NOTE: The most current version of the Plugin requires VisualVM release 2.1 or later which is available from https://visualvm.github.io/.
- Supported Coherence Versions
- Installation
- Connecting to a Coherence Cluster
- Changing the Plugin Behaviour via the Options Tab
- Monitoring Capabilities
- Using Coherence with the Tracer framework
- Building the Plugin
The Plugin will connect to and display data for the following Coherence versions:
-
Community Editions: 24.03.x, 23.09.x, 22.06.x, 14.1.1.0.x
-
Commercial Editions: 14.1.1.2206.x, 14.1.1.0.x and 12.2.1.4.x
Note: If you wish to connect to Coherence version 12.2.1.4.x via REST you should have Coherence version 12.2.1.4.7 or greater.
Note: Support for versions older than Commercial Edition 3.7, and Community Edition 21.12 is now deprecated and no longer supported. The plugin may still work with these older versions, but is not guaranteed to continue to. Please upgrade to the latest Coherence versions available for continued support.
The Coherence VisualVM Plugin is available from the list of plugins in VisualVM versions 2.0.6 and above.
Note: It is recommended to install VisualVM version 2.1.5 or later. This will ensure you can install the most up-to-date Coherence Plugin.
To install the Plugin carry out the following:
- Choose
Tools
->Plugins
from the main menu. - The Plugin will be displayed as
VisualVM-Coherence
. If it is not present in the list then click on theCheck for Newest
button - In the
Available Plugins
tab, select the Install checkbox for theVisualVM-Coherence
. Click Install. - Step through and complete the plugin installer.
Note: If you already have an older version of the plugin installed, click on
Check For Newest
and follow the prompts.
For more information about using the Coherence VisualVM plugin see the official Coherence Documentation.
Other useful resources:
- The Coherence Community - All things Coherence
- VisualVM Home Page
- Coherence Community Edition on GitHub
- Various Coherence Examples
- The Coherence Operator - Run your clusters in Kubernetes
Once the Plugin is installed, you can double-click on a Coherence process in the left pane, usually com.tangosol.net.DefaultCacheServer
, after which a Coherence
tab will be displayed.
You can also connect via Coherence Management over REST by right-clicking on the Coherence Clusters
tree item and choose Add Coherence Cluster
.
Provide a name for the cluster and use the following URL based upon what type of cluster you are connecting to:
-
Standalone Coherence -
http://<host>:<management-port>/management/coherence/cluster
-
WebLogic Server -
http://<admin-host>:<admin-port>/management/coherence/<version>/clusters
- You can uselatest
as the version.
Note: To enable Management over REST for a stand-alone cluster, please see the Coherence Documentation
If you have Coherence running within WebLogic Server using the Managed Coherence Servers
functionality you can either
connect via REST as described above or if you want to connect to the domain runtime MBean server
, use the instructions below.
-
Ensure you have the same version of WebLogic Server installed locally as the instance you are connecting to.
-
Use the following (on one line) to start VisualVM replacing WLS_HOME with your WebLogic Server home.
/path/to/visualvm --cp WLS_HOME/server/lib/wljmxclient.jar:WLS_HOME/server/lib/weblogic.jar -J-Djmx.remote.protocol.provider.pkgs=weblogic.management.remote -J-Dcoherence.plugin.visualvm.disable.mbean.check=true
Note: On a Mac, the default VisualVM installed is usually
/Applications/VisualVM.app/Contents/MacOS/visualvm
. For Windows ensure that you usevisualvm.exe
and change the/
to\
and change the classpath separator from:
to;
. -
From the VisualVM Applications tree, right-click
Local
and selectAdd JMX Connection
. The Add JMX Connection dialog box displays. -
Use either of the following connect strings depending upon the WebLogic Version you are connecting to.
For WebLogic Server 14.1.1.X and above use t3 protocol:
service:jmx:t3://hostname:port/jndi/weblogic.management.mbeanservers.domainruntime
For WebLogic Server 12.2.1.5 and below use iiop protocol:
service:jmx:iiop://hostname:port/jndi/weblogic.management.mbeanservers.domainruntime
Note: in WebLogic Server 14.1.1.x and above the
wljmxclient.jar
no longer exists and will be ignored in the classpath. You may remove it from the above--cp
statement if you like. -
Click
Use security credentials
and enter the WebLogic Server username and password. -
Check
Do not require SSL connection
if your connection is not SSL and selectConnect Immediately
. -
Right-Click on the connection and select
Open
. The Coherence tab will be displayed.If you wish to secure access to the REST endpoints or via JMX, please refer to either the Coherence Documentation or relevant JMX security documentation.
In the VisualVM Plugin, you can change the behaviour of the plugin by using the Options pane. To open the options choose the following depending upon your platform:
-
Mac:
VisualVM
->Preferences
and select theCoherence
tab. -
Windows/Linux:
Tools
->Options
and select theCoherence
tab.
You will see the preferences as shown below:
There are tool tips for each of the preferences, but a summary is shown below.
Coherence VisualVM Preferences
Preference | Default | Usage |
---|---|---|
Data Refresh Time | 30 | Time (in seconds) between refreshing data from the cluster. Do not set too low as this could adversely affect performance in large clusters. |
Log Query Times | false | Enables logging of query times to the VisualVM logfile when retrieving data. |
Disable MBean Check | false | Disables the MBean check when connecting to WebLogic Server. This allows the plugin to startup without checking for Cluster MBean. |
REST Request Timeout | 30000 | The request timeout (in ms) when using REST to connect to a cluster. |
Enable REST Debug | false | Enables HTTP request debugging when using REST to connect to a cluster. |
Disable SSL Certificate Validation | false | If selected, will disable SSL certificate validation. Note: You should only use this option when you are sure of the identity of the target server. |
Enable Persistence List | true | Enables dropdown list of snapshots rather than having to enter the snapshot when performing snapshot operations. |
Enable Zoom on Graphs | false | Enables additional zoom function for all graphs. |
Enable Cluster Snapshot tab | false | Enables experimental Cluster Snapshot tab. This tab is useful for seeing all the relevant cluster information on one page in a text format. |
Enable Cluster Heap Dump | false | Enables the cluster heap dump button on the Cluster Overview tab. |
Analyze Unavailable Time in LogFile | Provides the ability to analyze log files where Partition Events Logging has been enabled for logs generated from Coherence versions 21.06 and above. See here for more details. Note: You select a Coherence log file to analyze and don't need to be connected to a running cluster. |
For all Coherence clusters, the following tabs are displayed:
- Cluster Overview - Displays high-level information about the Coherence cluster including cluster name, version, member count and 'Cluster StatusHA'. Summary graphs show total cluster memory available and used, packet publisher and receiver success rates and load averages for machines running Coherence.
- Machines - Displays a list of the physical machines that make up the Coherence cluster as well as information about the load averages and available memory on these machines. See here for more details.
- Members - Displays the full list of Coherence members/nodes including individual publisher/ receiver success rates, memory and send queue sizes. See here for more details.
- Services - Displays information about the running services including partition counts and statusHA values. See here for more details. If you select a service, on the next data refresh you will see detailed thread information for each node of the service as well as graphs of that information
- Caches - Displays information about any caches including size, and memory usage information. To get the correct information to be displayed for memory usage, you must be using the binary unit-calculator. If you select a cache, on the next data refresh you will see detailed information about each node hosting that service and cache. See here for more details.
Depending upon the edition and functionality you are using, the following optional tabs may be displayed:
- Topics - If you cluster is configured with topics, this tab displays information about any active Topics including size, message rates and unconsumed messages. See here for more details.
- Proxy Servers - If your cluster is running proxy servers, this tab displays information about the proxy servers and the number of connections across each proxy server and total connections. See here for more details.
- HTTP Servers - If your cluster is running proxy servers with HTTP acceptors, this tab displays information about the HTTP servers, the number of connections across each server, total connections and graphs of response codes, errors and requests over time for a selected service. See here for more details.
- Executors - If your cluster is configured to run the Executor Service, this tab displays information about the number of tasks completed, in-progress and rejected. See here for more details.
- Coherence*Web - If your cluster is configured for Coherence*Web, this tab displays information about the number applications deployed, the number of HTTP sessions being stored as well as other information regarding session reaping. See here for more details.
- Federation - If your cluster is configured with Federated Caching, this tab displays information about each federated service. If you select a service, on the next data refresh you will see detailed outbound/inbound federation traffic information for each node of the service as well as graphs of that information. See here for more details.
- Persistence - If your cluster is configured with Persistence, this tab displays information about each service configured with Persistence. Graphs showing active space used and any additional latencies incurred are also showed. See here for more details.
- Elastic Data - If your cluster is configured with Elastic Data, this tab displays graphs and information about RAM Journal and Flash Journal usage. You can click on each of the usage bars to show detailed node information. See here for more details.
- JCache - If your cluster is being used to store JCache caches, this tab displays JCache "Management" and "Statistics" MBean information regarding the configured caches. See help for more details.
- HotCache - If your cluster contains HotCache node(s), then this tab lists the running HotCache instances. If you select an instance, on the next data refresh the console will display statistics and graphs for the operations performed. You may click on tabs and cache-ops to see further fine-grained information. See here for more details.
- gRPC Proxies – If your cluster is configured with gRPC Proxies, this tab displays information about the requests sent and received as well as successful and failed requests. A Graph of message rates and durations is also displayed. This tab will only show when connected via JMX and is not supported for REST connections. See here for more details.
- Health – If your cluster supports the Health Check API, this tab displays information regarding the status of all health endpoints. See here for more details.
Version 1.7.0 of the Coherence VisualVM Plugin introduces initial integration with the VisualVM Tracer framework.
From the VisualVM website:
The VisualVM Tracer framework provides detailed monitoring and analyzing Java applications. Using various probes, the Tracer gathers metrics from an application and displays the data in a timeline. The data are displayed both graphically and in a table and can be exported to common formats for further processing by external tools.
After installation, when you connect to a cluster via JMX, you will see the Tracer
tab as shown below:
There are a number of expandable groups allowing you to choose Coherence related probes to display on the timeline including:
- Coherence Cluster Overview - shows general cluster data such as members, heap, package publisher/receive rates and load averages
- Coherence Services - Overall - shows overall service partition data
- Coherence Services - Selected - shows data for the selected service only
- Coherence Caches - Overall - shows overall cache data such as total cache sizes and memory usage
- Coherence Caches - Selected - shows data for the selected cache only
- Coherence Proxy Servers - shows proxy connection details and outgoing backlogs
- Coherence Persistence - shows active and backup persistence data as well as maximum latency
- Coherence Federation - shows send and receive rates
- Coherence Elastic Data - shows elastic data flash a ram journal usage
To start recording tracer data, select the tracer probes that you wish to display and click Start
.
Note: The data displayed is the same as is display on the various Coherence tabs.
If you wish to build the Plugin from scratch please follow the instructions below.
You must have the following:
- Java JDK 11 Only - To build and test the plugin
- Maven 3.6.3+
- Git
-
Clone the Coherence VisualVM repository
git clone https://github.com/oracle/coherence-visualvm.git
-
Ensure you have JDK11 or above in your PATH.
-
Build the Plugin
From the
coherence-visualvm
directory:mvn clean install -DskipTests
If you wish to run the Community Edition tests then leave out the
-DskipTests
. -
Install the Plugin
The plugin will be available in the location
coherence-visualvm-plugin/target/coherence-visualvm-plugin-{version}.nbm
Follow the instructions here to install the plugin manually.
This project is not accepting external contributions at this time. For bugs or enhancement requests, please file a GitHub issue unless it’s security related. When filing a bug remember that the better written the bug is, the more likely it is to be fixed. If you think you’ve found a security vulnerability, do not raise a GitHub issue and follow the instructions in our security policy.
Please consult the security guide for our responsible security vulnerability disclosure process
Released under the GNU General Public License (GPL)