|
Oracle Coherence Monitor
User Guide |
|
Configuring a JMX Connection
This section provides step-by-step instructions for configuring a JMX connection to acquire data from the cluster. NOTE: To configure the OC 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 Appendix A - JMX Connection Choices for further details about JMX connection options.
The JMX connection method options are:
|
Cluster Property File
In the
following steps, you access the cluster
properties file you created when you installed and setup OCM. For details, see
cluster property file.
JMX Remote Port Configuration
The Data Server connects to an existing cluster
node that exposes a JMX port. The port can be exposed by adding the following
Java properties to a selected node's configuration:
-Dcom.sun.management.jmxremote.port=xxxx
-Dtangosol.coherence.management=all
The Data Server requires the host where the node runs, and the port that the node exposes. For more information see http://docs.oracle.com/cd/E18686_01/coh.37/e18682/jmx.htm.
Open your cluster property file, located in the conf subdirectory of the OC Monitor installation, in a text editor and make the following changes:
|
Proceed to Starting OCM.
JMX RMI Configuration
The connection URL for an existing
cluster node using an RMI adapter is required. The URL will be similar to the
following:
service:jmx:rmi://localhost:3000/jndi/rmi://localhost:9000/server.
Open your cluster property file, located in the conf subdirectory of the OC Monitor installation, in a text editor and make the following changes:
|
Proceed to Starting OCM.
Named JMX
Connection
You can create an RTView JMX connection in the
JMXTOPTIONS.ini file located in the projects/myocm folder of the OC
Monitor installation directory. There are two methods for creating the
connection:
1. In an initialized command window, navigate to the projects/myocm directory.
2. Open JMXOPTIONS.ini in a text editor and add the following line:
jmxconn jmxconname host port URL:- username password 'false' | |
For example: | |
jmx_metrics_period 10000 jmx_minreconnecttime 15 jmxconn local - - URL:local - - jmxdefaultconn local jmxconn production host port URL:- username password 'false' |
3. Change <username> and <password> to the desired password for the connection.
For example: | |
jmxconn production host port URL:- myusername newpassword 'false' |
4. Save JMXOPTIONS.ini.
5. Open the cluster property file, located in the conf directory, in a text editor and uncomment the second line in the following:
# - use a connection defined in JMXOPTIONS.ini
sl.rtview.ocm.jmxconn=<connection_name>
6. Replace <connection_name>with the name of the connection specified in
the JMXOPTIONS.ini file:
# - use a connection defined
in JMXOPTIONS.ini
sl.rtview.ocm.jmxconn=production
7. Verify that all other JMX connection properties are comments:
# sl.rtview.ocm.jmxhost
# sl.rtview.ocm.jmxport
# sl.rtview.ocm.jmxurl
8. Save the cluster property file and exit the text editor.
Proceed to Password
Encryption, next.
Password Encryption
If you create a JMX connection by editing JMXOPTIONS.ini with a text
editor, the connection password will be in plain text. To encrypt the password
on a headless system perform the following steps:
1. In the
initialized command window,
and in the projects/myocm directory, 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.
2. Copy and paste the encrypted value into the <password> field of
JMXOPTIONS.ini. For example:
jmxconn production host port URL:- myusername 01334013350134301345 'false'
3. Edit the ocm_setup.bat or ocm_setup..sh script, located in the
conf directory, as needed for authentication:
Proceed to Starting OCM.
Multi-Cluster Configuration
This section describes how to configure
the OCM to monitor multiple Coherence clusters. To configure the OC 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).
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 OC Monitor for multiple
Coherence clusters:
1. Configure named JMX connections as described in one of the
previous JMX Connection Method Options.
2. Verify that you can connect to each cluster you wish to monitor, using an explicit named JMX connection (according to the JMX Connection Method you configured in Step 1).
3. Ensure that the following properties are set in the Cluster.properties file (located in the conf directory) that will be used for multi-cluster monitoring:
NOTE: The OCM command line scripts use DemoCluster and thus DemoCluster.properties as the default Cluster.properties file. Other Cluster.properties files can be named explicitly as a command line argument to the OCM Scripts. For example, you can use a properties file named MultiCluster.properties for monitoring multiple clusters, and use it to configure the OCM processes. For example: startocm MultiCluster.
Also, a multi-cluster 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 Cluster.properties file, see Cluster Property File Example.
4. Open the JMXOPTIONS.ini file and ensure that all clusters you intend to monitor have verified correct, unique and meaningfully named JMX connection definitions. Edit as needed. The cluster name should be descriptive as it is used in OCM displays and alert messages. For example, DEV1, SALES1.
For a sample JMXOPTIONS.ini file, see JMXOPTIONS.ini File Example.
5. If additional clusters need to be monitored that are not specified as a named connection in the JMXOPTIONS.ini file, add an entry for the cluster (using unique and meaningfully named JMX connection definitions), save the file and restart the Data Server.
Cluster Property File Example
# OCM (Multi) Cluster Configuration Parameters
#
# Specify whether OCM should connect as a node or not
#
# Multi Cluster - Do not conect as a node,
# Connect using multiple JXM Connections
#
sl.rtview.ocm.node=false
#
# Connect using multiple (all) named JXM Connections, defined in JMXOPTIONS.INI
#
sl.rtview.ocm.jmxconn=*
#
# Additional OCM Configuration
#
# Options for OCM agent, data server, display server and historian options
ocm.work_dir=projects/myocm
ocm.log_dir=logs
# Usage flags require true/false
ocm.use_jmxtables=false
ocm.use_fastjmx=false
# Default ocm.use_agent should be false
ocm.use_agent=false
ocm.agent_dir=projects/myocm_agent
ocm.agent_port=3351
ocm.jmx_period=10000
ocm.dataserver_port=3381
ocm.displayserver_port=3361
# When dataserver_url is empty a default is generated automatically in the
scripts
# When defined, it is used as is.
# Example: Direct Data Server Connection:
# ocm.dataserver_url=-dataserver://dataserver_host:dataserver_port
# Example: HTTP Data Server Connection:
# ocm.dataserver_url=-dataserver:remote:http://http_host:http_port/myocm_rtvdata
ocm.dataserver_url=
ocm.agent_log=MultiCluster_agent.log
ocm.data_log=MultiCluster_dataserver.log
ocm.display_log=MultiCluster_displayserver.log
ocm.historian_log=MultiCluster_historian.log
jmx_metrics_period 10000
jmx_minreconnecttime 15
jmxconn local - - URL:local - - 'false'
jmxconn cluster_1 192.9.200.110 9971 URL:- - - 'false'
jmxconn cluster_2 192.9.200.120 9971 URL:- - - 'false'
jmxconn cluster_3 192.9.200.130 9971 URL:- - - 'false'
jmxconn cluster_4 192.9.200.140 9971 URL:- - - 'false'
jmxconn cluster_5 192.9.200.150 9971 URL:- - - 'false'
jmxdefaultconn local
jmxdsCheckValidAttributeNames false
jmx_mbeans_change_dynamically false
Starting the Builder
This section provides step-by-step
instructions for starting the RTView Builder using the supplied script.
Windows
Double-click Win_RunOCMBuilder.bat in the bin subdirectory of the
OC Monitor
installation.
Proceed to Verifying Your Configuration.
UNIX/Linux
1. Open a command prompt window and navigate to the OC Monitor installation directory.
Example: cd /opt/rtvoc_55c1
2. Run the
OC Monitor initialization script.
Example: . ./rtvoc_init.sh (Note there are two periods with a space between
them.)
3. Navigate to the myocm
directory.
Example: cd projects/myocm
4. Run the
Builder
script.
Example: Unix_RunOCMBuilder.sh
The Builder UI opens.
5. Click Tools / Options and select JMX in the left pane of the Application Options window.
6. Define a JMX connection as described at http://sldownloads.sl.com/docs/rtview/57/ds/jmx/boptions_jmxtab.html, and save your work when the connection is defined.
7. If needed, transfer JMXOPTIONS.ini to the system hosting the OC Monitor, and put it in the myocm project directory. Alternatively, you can extract only the new JMX connection with an editor and paste it into any JMXOPTIONS.ini file that needs it.
The following is a JMX connection example. The long sequence of numbers in each connection is an encrypted password.
jmxconn JMXURLCONN1 - - URL:service:jmx:rmi://myjmxhost:3000/jndi/rmi://myjmxhost:9000/server useract1 0134601331013490134901353013450134801334 'false'
jmxconn JMXPORTCONN1 myjmxhost 9991 URL:- useracct1 0134601331013490135301345013480133401284 'false'
8. Open your cluster property file, located in the conf subdirectory of the OC Monitor installation, in a text editor and edit as follows:
|
Proceed to Verifying Your Configuration.
RTView contains components licensed under the Apache
License Version 2.0. |
Treemap Algorithms v1.0 is used without
modifications and licensed by MPL Version 1.1. Copyright © 2001 University of
Maryland, College Park, MD |
Datejs is licensed under MIT. Copyright © Coolite Inc. |
jQuery is
licensed under MIT. Copyright © John Resig, |
JCalendar 1.3.2 is licensed under LGPL.
Copyright © Kai Toedter. |
jQuery is licensed under MIT. Copyright (c) 2009 John
Resig, http://jquery.com/ JCalendar 1.3.2 is licensed under LGPL.
Copyright © Kai Toedter. |
JMS, JMX and Java are trademarks or registered trademarks
of Sun Microsystems, Inc. in the United States and other countries. They are
mentioned in this document for identification purposes only. |
SL, SL-GMS, GMS, RTView, SL Corporation, and
the SL logo are trademarks or registered trademarks of Sherrill-Lubinski
Corporation in the United States and other countries. Copyright © 1998-2011
Sherrill-Lubinski Corporation. All Rights Reserved. |