Skip to content

The Coherence-VisualVM Plugin provides management and monitoring of a single Coherence cluster using the VisualVM management utility.

License

Notifications You must be signed in to change notification settings

classicvalues/coherence-visualvm

 
 

Repository files navigation

Coherence VisualVM Plugin

Coherence CE

CI Build

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 14.1.1 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
This version of the Plugin requires VisualVM release 2.0.6 or later which is available from https://visualvm.github.io/.
Coherence VisualVM Plugin

Supported Coherence Versions

The Plugin will connect to and display data for the following Coherence versions:

Community Editions: 14.1.1.0.x, 20.06.x, 20.12.x, 21.06.x and 21.12.x

Commercial Editions: 14.1.1.0.x, 12.2.1.5.x, 12.2.1.4.x, 12.1.3.x, 12.1.2.x and 3.7.1.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.

Installing the Plugin from VisualVM

The Coherence VisualVM Plugin is available from the list of plugins in VisualVM versions 2.0.6 and above.

To install the Plugin carry out the following:

  1. Choose ToolsPlugins from the main menu.

  2. The Plugin will be displayed as VisualVM-Coherence. If it is not present in the list then click on the Check for Newest button

  3. In the Available Plugins tab, select the Install checkbox for the VisualVM-Coherence. Click Install.

  4. Step through and complete the plugin installer.

Coherence VisualVM Plugin Install
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:

Connecting to a Coherence Cluster

1. Connecting Directly to a Process

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.

2. Connecting via Management over REST

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:

Note
To enable Management over REST for a stand-alone cluster, please see the Coherence Documentation.

3. Connecting to Coherence in WebLogic Server via the Admin Server

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.

  1. Ensure you have the same version of WebLogic Server installed locally as the instance you are connecting to.

  2. 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 use visualvm.exe and change the / to \ and change the classpath separator from : to ;.
  3. From the VisualVM Applications tree, right-click Local and select Add JMX Connection. The Add JMX Connection dialog box displays.

  4. 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.
  5. Click Use security credentials and enter the WebLogic Server username and password.

  6. Check Do not require SSL connection if your connection is not SSL and select Connect Immediately.

  7. Right-Click on the connection and select Open. The Coherence tab will be displayed.

Note
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.

Changing the Plugin Behaviour via the Options Tab

In version 1.0.1 or above of 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:

  1. Mac: VisualVMPreferences and select the Coherence tab.

  2. Windows/Linux: ToolsOptions and select the Coherence tab.

You will see the preferences as shown below:

Coherence CE

There are tool tips for each of the preferences, but a summary is shown below.

Table 1. Table 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 identify 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 pae 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.

Monitoring Capabilities

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.

  • Members - Displays the full list of Coherence members/nodes including individual publisher/ receiver success rates, memory and send queue sizes.

  • Services - Displays information about the running services including partition counts and statusHA values. 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.

Depending upon the edition and functionality you are using, the following optional tabs may be displayed:

  • 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.

  • 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.

  • Executors - If your cluster is configured to run the Executor Service, this tab displays information number of tasks completed, in-progress and rejected.

  • 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.

  • 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.

  • 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.

  • 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

  • JCache - If your cluster is being used to store JCache caches, this tab displays JCache "Management" and "Statistics" MBean information regarding the configured caches.

  • 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.

Building the Plugin

If you wish to build the Plugin from scratch you need to build the VisualVM dependencies first. To build the plugin is a two-step process:

  1. Generate the VisualVM dependencies

  2. Build the Coherence VisualVM Plugin

Pre-requisites

You must have the following:

  1. Java JDK 1.8 - To build VisualVM dependencies

  2. Java JDK 11+ - To build and test the plugin

  3. Ant version >= 1.9.9

  4. Maven 3.6.3+

  5. Git

Clone the Repository

  1. Clone the Coherence VisualVM repository

    $ git clone https://github.com/oracle/coherence-visualvm.git

Generate the VisualVM dependencies

Note
These instructions have been summarized from https://github.com/oracle/visualvm/blob/release204/README.md.
Note
A Script install-artifacts.sh is available in the bin directory to run this for a Linux/Mac environment.
  1. Ensure you have JDK8 in you PATH.

  2. Checkout the VisualVM repository

    $ git clone https://github.com/oracle/visualvm.git
    
    Cloning into 'visualvm'...
  3. Checkout the release204 branch

    $ cd visualvm
    
    $ git checkout release204
    
    Switched to a new branch 'release204'
  4. Unzip the NetBeans Platform 11.3

    $ cd visualvm
    
    $ unzip nb113_platform_19062020.zip
  5. Build the Plugins

    $ ant build-zip
  6. Unzip the artefacts

    $ cd dist
    
    $ unzip visualvm.zip
    
    $ cd ..
  7. Generate the NBM’s

    $ ant nbms
  8. Install into the local repository

    $ mvn -DnetbeansInstallDirectory=dist/visualvm   \
        -DnetbeansNbmDirectory=build/updates   \
        -DgroupIdPrefix=org.graalvm.visualvm  \
        -DforcedVersion=RELEASE204 org.apache.netbeans.utilities:nb-repository-plugin:populate
Note
See here for instructions on how to push the artefacts to a remote Maven repository.

Build the VisualVM Plugin

  1. Ensure you have JDK11 or above in your PATH.

  2. 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.

  3. Install the Plugin

    The plugin will be available in the location coherence-visualvm-plugin/target/coherence-visualvm-plugin-{version}

Follow the instructions here to install the plugin manually.

About

The Coherence-VisualVM Plugin provides management and monitoring of a single Coherence cluster using the VisualVM management utility.

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 99.8%
  • Shell 0.2%