Free 30 Day Trial
Find the root-cause of your cloud, hybrid-cloud
or on-prem performance issues
|
||
|
Installing eG Java BTM on GlassFish
The steps for deploying the eG Java BTM on a GlassFish server will differ based on how the GlassFish server is configured - i.e., as a standalone server or as part of a cluster - and based on how the GlassFish server is monitored - i.e., in an agent-based or agentless manner.
BTM-Enabling a GlassFish Server Monitored in an Agent-based Manner
If the GlassFish server is a stand-alone server that is to be monitored in an agent-based manner, then follow the steps below to BTM-enable the server:
Next, follow the Agents -> BTM Profiler Download menu sequence in the eG admin interface. Figure 1 will then appear, listing the Java application servers managed in the environment. Locate the GlassFish server that you managed recently in that list, and click the Copy JVM icon () corresponding to it (see Figure 1).
Figure 1 : Clicking the Copy JVM icon corresponding to the GlassFish server that is monitored in an agent-based manner
Figure 2 will then appear. Copy the JVM option displayed in Figure 2 to the clip board or any text editor.
Figure 2 : Copying the JVM option for BTM-enabling a GlassFish server managed in a agent-based manner
Next, login to the GlassFish Administration console. Click the Application Servers option in the left panel of the console. From the options listed in the right panel, select JVM Settings first, and then JVM Options, as depicted by Figure 3.
Figure 3 : Configuring JVM Options for the GlassFish server managed in an agent-based manner
Next, if the GlassFish server being BTM-enabled is of v3.x (or above), then add the package com.eg in the boot delegation framework. If GlassFish v3.1.1 is being monitored, and the Equinox OSGI container is used, then edit the <<GLASSFISH_INSTALL_DIR>>\glassfish\osgi\equinox\configuration\config.ini file to add the package “com.eg.*". Similarly, if GlassFish v3.1.1 is being monitored, and the Felix OSGI container is used, then edit the <<GLASSFISH_INSTALL_DIR>>\glassfish\osgi\felix\conf\config.properties file to add the "com.eg.*". Figure 4 depicts how to add this package to the config file.
A GlassFish cluster is where one or more instances of the GlassFish server run. All the instances in a cluster will use the same configuration (JVM). This means that to BTM-enable all the server instances running within a cluster, you only need to enable BTM at the cluster configuration level. To achieve this, follow the steps below:
Next, follow the Agents -> BTM Profiler Download menu sequence in the eG admin interface. Figure 5 will then appear, listing the Java application servers managed in the environment. Locate any of the GlassFish server instances that you managed recently in that list, and click the Download icon corresponding to it (see Figure 5).
Figure 5 : Clicking the Download icon corresponding to a managed GlassFish server instance in a cluster
Next, log into the GlassFish server instance that you want to BTM-enable. Create a new directory named "egbtm" under <GLASSFISH_HOME>\glassfish\nodes\<node>\<instance> on that server instance and extract the downloaded contents into the newly created egbtm directory.
Figure 6 : Copying the downloaded contents to the egbtm directory of every server instance
Next, log into the GlassFish administration console. When Figure 7 appears, expand the node representing the cluster name in the tree-structure in the left panel, and select the JVM Settings sub-node within.
Figure 7 : Configuring Java Options at the cluster configuration level
Then, click on the JVM Options tab page in the right panel. In the Value text area in the JVM Options page, insert the following entry:
-javaagent:${com.sun.aas.instanceRoot}/egbtm/eg_btm.jar
Restart the server.
BTM-Enabling a GlassFish Server Monitored in an Agentless Manner
If the GlassFish server is to be monitored in an agentless manner, then follow the steps below to BTM-enable the server:
If you have managed multiple GlassFish server instances running on a single host, then you will have to create multiple sub-directories under the btm directory- one each for every instance. Each of these sub-directories should be named after the Nick name and Port number using which the corresponding instance has been managed in eG.
Figure 8 will appear listing the servers that can be instrumented for APM by eG. In this list, locate the GlassFish server that you want to BTM-enable. Once you locate the server, click the Download icon corresponding to that server to download the APM Profiler Agent to that server. If multiple GlassFish server instances on a single host are managed, then you will have to download the APM Profiler Agent separately for each of the managed instances.
Figure 8 : Downloading the APM Profiler Agent for the GlassFish server
Figure 9 depicts the extracted contents of the zip file.
Then, you need to configure the GlassFish server with the path to the eg_btm.jar file. To achieve this, you can use one of the following two ways:
If you choose to use the GlassFish Administration console, then first, login to the console. Then, follow the steps detailed below:
When Figure 10 appears, click on the server-config node in the tree-structure in the left panel.
Figure 10 : Clicking on the server-config node
From the options listed in the right panel of Figure 10, select the JVM Settings option. Figure 11 will then appear. Select the JVM Options tab page in Figure 11.
Figure 12 will then appear. You now need to add a JVM option. For this, click on the Add JVM Option button in Figure 12.
An empty row will then be inserted, as depicted by Figure 13.
Figure 13 : Two empty rows inserted in the JVM Options tab page
-javaagent:<Path_to_eg_btm.jar_file>
For instance, if the eg_btm.jar file is extracted into the C:\btm\GlassFish1_4848 directory, the above specification will be:
-javaagentC:\btm\GlassFish1_4848\eg_btm.jar
Figure 14 : Specifying the Java arguments for BTM-enabling the GlassFish server
On the other hand, if you want to BTM-enable the GlassFish server by editing the start-up script of the GlassFish server instance, then follow the steps below:
Open the start-up script and enter the following line in it, as depicted by Figure 15.
<jvm-options>-javaagent:<<Path_to_eg_btm.jar_file>></jvm-options>
For instance, if the eg_btm.jar file and .props files areis extracted into the C:\btm\GlassFish1_4848 directory, the above specification will be:
<jvm-options>-javaagent:C:\btm\GlassFish1_4848\eg_btm.jar</jvm-options>
Figure 15 : Editing the start-up script of the GlassFish server instance to BTM-enable the instance
Restart the server.
Verifying the Successful Deployment of eG BTM on a GlassFish Server
Once the –javaagent JVM option is added and server is restarted, check for the presence of “[eG BTM]” and “BTM is ENABLED” in application server’s standard output, as indicated by Figure 16. If the text highlighted by Figure 16 is present, it means that the –javaagent entry is taken and BTM is successfully enabled.
Figure 16 : Verifying the successful deployment of eG BTM on a GlassFish server