Enterprise RTView® 
User Guide


Oracle® Coherence Monitor - Customization

There are several options for customizing the Oracle Coherence Monitor. The sections below describe how to customize connections, displays and security. Any files described below will need to be stored somewhere where the Oracle Coherence Monitor can access them. You should create a working directory to hold these files and run the OCM from that directory while you are working on the customization. When your customization files are ready, you must make them available to the OCM (as well as to the Display Server, Data Server and Historian if you will be using them).
 


Add and Modify Connections
 By default, the Oracle Coherence Monitor comes configured with two JMX connections: LocalJmxNode and RemoteJmxRMI.

The LocalJmxNode connection is used when you run the OCM as the management node in your cluster. This connection requires no modifications.

The RemoteJmxRMI connection is used when you run the OCM using a remote JMX port. This connection is configured to listen to port 9991 on localhost with no authentication. Unless this is the correct host, port and authentication setting for your JMX enabled management node, you must modify the RemoteJmxRMI connection.

You may want to create additional JMX connections to run multiple instances of the OCM to connect to different JMX enabled management nodes. All of the built-in displays provided use the $conn substitution as the connection for all data attachments. When you run the Oracle Coherence Monitor, you can specify a different connection name for the $conn substitution as follows (where MyConnection is the name of your JMX connection):

run_ocmonitor -sub:$conn:MyConnection

NOTE: On UNIX, passing a connection substitution as a command line argument requires a \ before the $ (e.g. -sub:\$conn...). This prevents the UNIX shell from looking in the environment for the connection variable.

JMXOPTIONS.ini
 The initialization file JMXOPTIONS.ini (contained in lib\gmsjocm.jar and also located in demos\ocmdemo) contains all JMX connection definitions. In order to edit these connections or add new connections, run either the Display Builder or Configuration Utility from a directory containing a copy of  JMXOPTIONS.ini. In the Display Builder or Configuration Utility, use the JMX Connections tab to add or modify connections and Save your changes. When you save you will be asked if you want to save to lib or to the current directory, select the current directory. Once you save your changes, you must make the modified JMXOPTIONS.ini file available to the OCM.


Add Displays
In addition to the built-in displays contained in the Oracle Coherence Monitor, you can use the Display Builder to build custom displays.

  • Displays that will be shown in the main window look best if background size is set to W=736x H=544. This is the default in the Display Builder. 
  • You may attach to the JMX metrics for your cluster using the JMX data source. NOTE: In order for the JMX metrics to be available to the Display Builder, you will need to use the -ocm command line option if you want to connect using a remote JMX port, or the -ocmnode command line option if you want to run as the management node in your cluster.  
  • You may need to add custom functions to manipulate tables of data and perform custom transformations in your custom displays. See the Custom Functions section for information on creating custom functions for your displays.
  • Add your displays to the Oracle Coherence Monitor navigation tree by creating a navigation tree definition file named custom_navtree.xml. Top level nodes from your navigation tree definition file will show up at the end of the navigation tree. See demos\ocmdemo for an example of adding custom displays to the navigation tree.
  • Once you have created your displays and your custom_navtree.xml, you must make these files available to the OCM.

Customize Security

By default, the Oracle Coherence Monitor comes configured with three roles: demo, admin and super. (See Role-Based Security for information on modifying built-in security.) To customize security, copy users.xml and roles.xml (contained in lib\gmsjocm.jar and also located in demos\ocmdemo) into your working directory. Once modified, you must make these files available to the OCM.

NOTE: The built-in admin and super roles are used in the Administration displays to limit administration activities to users with the correct permissions. These roles should not be removed.


Use Process Name as Location Name

Start the Oracle Coherence Monitor with the command line option -processnames to specify that the Process Name should be used as the Location Name for all nodes.

run_ocmonitor -ocmnode -processnames

NOTE: When using multiple command line arguments, -ocm or -ocmnode must come first. For example, run_ocmonitor -ocmnode -u1000 will work; run_ocmonitor -u1000 -ocmnode will not.


Shorten Long Cache Names

To shorten long Cache Names, edit the substitution variable $cacheNameFormat contained in the initialization file OPTIONS.ini. By default, $cacheNameFormat is set to 14*14 and displays the initial 14 characters followed by a ".." and then the remaining 14characters.

Change the value of $cacheNameFormat to N*M, where N is the number of initial characters to display and M is the number of ending characters to display.

$cacheNameFormat 5*9

Alternately, it is possible to start the Oracle Coherence Monitor with the command line option -sub:$cacheNameFormat:N*M.

NOTE: Application options set on the command line will override values in initialization (.ini) files.

run_ocmonitor -ocmnode -sub:$cacheNameFormat5*9

NOTE: When using multiple command line arguments, -ocm or -ocmnode must come first. For example, run_ocmonitor -ocmnode -u1000 will work; run_ocmonitor -u1000 -ocmnode will not.


Use a Custom Historian Database

By default the Historian will connect to the HSQLDB database in demos\ocmdemo. You can use any database that supports JDBC, however you must first set up your custom database as the Historian database.

Next, add a table to your database named CACHEHEALTHDATA with the following fields:

Field Name Field Type Recommended Field Length (if applicable)
SERVICE  Text 50
NAME Text 50
TIER  Text 50
CACHEHITS  Long Integer N/A
CACHEMISSES  Long Integer N/A
TOTALGETS Long Integer N/A
TOTALPUTS  Long Integer N/A
CACHEHITPERCENT  Double N/A
UNITS  Long Integer N/A
LOWUNITS Long Integer N/A
HIGHUNITS  Long Integer N/A
TIMESTAMP  Text 50
TIMESTAMP_LS Text 50

HISTORY.ini
The initialization file HISTORY.ini contains all Historian definitions. Run the Historian and configure it to use your custom database and Save your changes. Once you save your changes, you must make the modified HISTORY.ini file available to the OCM.

OPTIONS.ini
The initialization file OPTIONS.ini (contained in lib\gmsjocm.jar and also located in demos\ocmdemo) contains a SQL connection named RTVHISTORY for the Historian. To edit this connection to point to your database, run either the Display Builder or Configuration Utility from a directory containing a copy of OPTIONS.ini. In the Display Builder or Configuration Utility, use the SQL Connections tab to modify the RTVHISTORY connection and Save your changes. When you save you will be asked if you want to save to lib or to the current directory, select the current directory. Once you save your changes, you must make the modified OPTIONS.ini file available to the OCM.

 

 

Make Customization Files Available to the Oracle Coherence Monitor

When your customization files are ready, you have three options to make them available to the OCM (as well as to the Display Server, Data Server and Historian if you will be using them):

1. Run the OCM, Display Server, Data Server and Historian from your working directory. If you select this option and decide to run any of the applications from another system, you'll need to copy this directory to that system and run from there.

2. Pack your files into a .jar file named myclasses.jar. The scripts for the OCM, Display Server, Data Server and Historian will look for this .jar file in the startup directory and add it to the classpath. If you select this option and decide to run any of the applications from another system, you'll need to copy myclasses.jar to the startup directory there.

3. Pack your files into a .jar file by any name. Add the path to this .jar file to the RTV_USERPATH environment variable on any system where you will be running the OCM, Display Server, Data Server or Historian.

Using Custom Navigation Tree Definition File with the Display Server
If you have created custom_navtree.xml and will be using the Display Server, you will need to add it to the ocmonitor.war servlet:

1. Copy custom_navtree.xml to servlets\ocmonitor.

2. In an initialized command window go to the servlets\ocmonitor directory.

3. Rebuild ocmonitor.war, type:

make_war ocmonitor

4. Use this version of ocmonitor.war when deploying the OCM as a thin client application.

 

 

 

 

 

 

 

 

 

 

 

 

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

 

JCalendar 1.3.2 is licensed under LGPL. Copyright © Kai Toedter.

 

jQuery is licensed under MIT. Copyright © John Resig,

 
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, Enterprise 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-2009 Sherrill-Lubinski Corporation. All Rights Reserved.