This section provides step-by-step instructions for configuring a JMX connection to acquire data from the cluster. NOTE: To configure the Monitor for multiple Coherence clusters a JMX connection method is required.
If you have an existing management node in your cluster, choose the JMX connection variant that applies. If you do not have an existing management node in your cluster, see the following guidelines.
Also see JMX Connection Options for further details about JMX connection options.
The data connection method options are:
Named JMX Connection: This method is can be used with both the JMX remote port and the JMX RMI URL connection methods. Use this method when the JMX connection requires a user name and password.
Multi-Cluster Configuration: This method is for using the Monitor for multiple Coherence clusters. This method consolidates the monitoring of Coherence clusters (rather than having a monitoring system for each cluster), is easy to configure (using one of the JMX Connection methods) and requires a single historical database instance.
This section describes how to create an RTView JMX connection in the rtview.properties file using a text editor and the encode_string utility. These instructions assume you have a project directory, as described in Quick Start. The rtview.properties file is located in your project directory, projects/rtview-server.
Open the rtview.properties file in a text editor and add the following line (below the Collector named JMX Connections JMX connections comment) to set the value for the maincollector.sl.rtview.jmx.jmxconn property:
# maincollector.sl.rtview.jmx.jmxconn=<conn_name> <host> <port> URL:- - - 'false'
maincollector.sl.rtview.jmx.jmxconn=<conn_name> <host> <port> URL:- - - 'false'
Where:
<conn_name> is the name of the connection
<host> is the hostname of the machine with the Coherence management node
<port> is the port number used by the management node
(specified by -Dcom.sun.management.jmxremote.port=xxxx, as described above)
For example:
maincollector.sl.rtview.jmx.jmxconn=MyCluster localhost 9971 URL:- - - 'false'
Set the <username> and <password> as desired for the connection.
For example, when no username or password are required:
maincollector.sl.rtview.jmx.jmxconn=MyCluster localhost 9971 URL:- - - 'false'
For example, when a username and password are required:
maincollector.sl.rtview.jmx.jmxconn=MyCluster localhost 9971 URL:- myusername mypassword 'false'
Specify the name of the JMX connection you just created by setting the sl.rtvapm.ocmon.jmxconn property value as follows:
# - use a named jmx connection
sl.rtvapm.ocmon.jmxconn=<conn_name>
Where:
<conn_name> is the name of the connection you created
Specify to not connect as a node (so we can use JMX) by setting the sl.rtvapm.ocmon.node property value to false:
# Specify whether the Monitor should connect as a node or not
sl.rtvapm.ocmon.node=false
Verify that all other JMX connection properties are comments:
# sl.rtvapm.ocmon.jmxhost
# sl.rtvapm.ocmon.jmxport
# sl.rtvapm.ocmon.jmxurl
Save the rtview.properties file and exit the text editor.
See Password Encryption, next.
Or proceed to Verifying Your Configuration.
If you create a JMX connection by editing the rtview.properties file in a text editor, the connection password will be in plain text. To encrypt the password perform the following steps:
Navigate to the projects/rtview-server directory and type:
encode_string jmx <password>
where <password> is your password to be encrypted.
For example:
encode_string jmx newpassword
The encrypted value, a series of numbers, is returned.
Copy and paste the encrypted value into the <password> field of the JMX connection definition in the rtview.properties file. For example:
maincollector.sl.rtview.jmx.jmxconn=MyCluster localhost 9971 URL:- myusername 01343013550134601331013490134901353013450134801334 'false'
Edit the rtview.properties file as needed for authentication:
Add all necessary JMX options to the JVM property sl.rtview.jvm=
Add all necessary class paths to the classpath property as sl.rtview.cp=property values
Add keystore
Proceed to Verifying Your Configuration.
This section describes how to configure the Monitor for multiple Coherence clusters. To configure the Monitor for multiple Coherence clusters JMX connections are required (a direct connection is not compatible, since there can only be a direct connection to a single cluster). These instructions assume you have a project directory, as described in Quick Start. The rtview.properties file is located in your project directory.
NOTE: Multi-cluster monitoring requires sufficient resources to monitor all the clusters you intend to monitor. Verify that you have sufficient resources for the clusters you intend to monitor.
To configure the Monitor for multiple Coherence clusters:
Configure named JMX connections as described in Named JMX Connection.
Verify that you can connect to each cluster you wish to monitor using an explicit named JMX connection.
Ensure that the following property values are set in the rtview.properties file that are used for multi-cluster monitoring:
sl.rtvapm.ocmon.node=false (where false specifies not to use a single direct connection)
sl.rtvapm.ocmon.jmxconn=* (where * specifies to use all named JMX connections)
NOTE: The ocmon command line scripts use rtview.properties as the default .properties file. Other <user>.properties files can be named explicitly as a command line argument to the ocmon scripts. For example, you can use a properties file named MultiCluster.properties for monitoring multiple clusters, and use it to configure the Monitor processes. For example: start_rtv default all -properties:MultiCluster.
Also, a multi-cluster .properties file can refer to more than one cluster. Therefore the name of the file should describe the group of clusters monitored (for example, DemoClusters, DevClusters). For a sample rtview.properties file, see Monitor Properties.
Open the rtview.properties file and ensure that all clusters you intend to monitor have correct, unique and meaningfully named JMX connection definitions. Edit as needed. The cluster name should be descriptive as it is used in Monitor displays and alert messages. For example, DEV1 and SALES1. For a sample rtview.properties file, see Monitor Properties.
If additional clusters need to be monitored that are not specified as a named connection in the rtview.properties file, add an entry for the cluster (using unique and meaningfully named JMX connection definitions).
Save the file.
Restart the Data Server.
Proceed to Verifying Your Configuration.