Installing eG Java BTM on an Oracle WebLogic Server

The steps for deploying the eG Java BTM on a WebLogic server will differ based on the what type of server is being monitored - whether an Admin server or a server instance - and how eG Enterprise has been configured to monitor that server/instance - whether in an agent-based or agentless manner.

BTM-Enabling a WebLogic Server Managed in an Agent-based Manner

Follow the steps below to BTM-enable a WebLogic Admin Server that is managed in an agent-based manner:

  1. Login to the WebLogic server.
  2. Open a browser on the server, connect to the eG manager, and login to the eG admin interface.
  3. Manage the WebLogic server as a separate component using the eG administrative interface. When managing, make sure you set the Agentless flag unchecked.
  4. Next, follow the Agents -> BTM Profiler Download menu sequence in the eG admin interface.
  5. Figure 1 will appear listing the servers that can be instrumented for APM by eG. In this list, locate the WebLogic Admin server that you want to BTM-enable. Once you locate the server, click the Copy JVM icon corresponding to that server.

    Figure 1 : Locating the WebLogic Admin Server that is to be BTM-enabled

  6. Figure 2 will then appear. Click on the Copy button to Figure 2 to copy the JVM options displayed therein to a text editor or clip board.

    Figure 2 : Copying JVM options

  7. Next, navigate to the <WEBLOGIC_HOME_DIR>\bin directory and edit the setDomainEnv.bat file (on Windows; on Unix systems, this will be the setDomainEnv.sh file).
  8. Look for the JAVA_OPTIONS setting in the file. Once you find it, append the code block you copied to the editor/clip board at step 6 above, to the JAVA_OPTIONS setting, as indicated by Figure 3. When doing so, make sure you replace the <<EGURKHA_AGENT_HOME>> tag in the entry with the actual install directory of the eG agent deployed on the WebLogic server.

    Figure 3 : Setting JAVA_OPTIONS for the WebLogic Admin server

  9. Save the file, stop the Admin server, and start it.

Follow the steps below to BTM-enable a WebLogic server/instance that is managed in an agent-based manner:

  1. Login to the WebLogic server.
  2. Open a browser on the server, connect to the eG manager, and login to the eG admin interface.
  3. Manage the WebLogic server as a separate component using the eG administrative interface. When managing, make sure you set the Agentless flag unchecked.
  4. Next, follow the Agents -> BTM Profiler Download menu sequence in the eG admin interface.
  5. Figure 1 will appear listing the servers that can be instrumented for APM by eG. In this list, locate the WebLogic server/instance that you want to BTM-enable. Once you locate the server, click the Copy JVM icon corresponding to that server.

    Figure 4 : Locating the WebLogic server/instance that is to be BTM-enabled

  6. Figure 5 will then appear. Click on the Copy button to Figure 5 to copy the JVM options displayed therein to a text editor or clip board.

    Figure 5 : Copying JVM options for a WebLogic server/instance

  7. Next, proceed to BTM-enable the target WebLogic server/instance. This can be achieved using either of the following approaches:

    • Using the WebLogic server console;
    • By editing the setDomainEnv file on the server/instance
  8. To use the WebLogic server console, do the following:

    • First, login to the console.
    • Then, navigate to the Servers sub-node under the Environment node in the tree-structure in the left panel of the console (see Figure 6).

      Figure 6 : Selecting the WebLogic server/instance to be BTM-enabled from the console

    • From the list of servers displayed in the right panel, select the server/instance you want to BTM-enable. When Figure 7 appears, click on the Server Start tab page therein to open it. Then, in the Arguments section, paste the JVM options you copied at step 5 above. When doing so, make sure you replace the <<EGURKHA_AGENT_HOME>> tag in the entry with the actual install directory of the eG agent deployed on the WebLogic server.

      Figure 7 : Configuring JVM options in the Server Start tab page

    • Then, save the changes by clicking on the Save button, as indicated by Figure 7.
    • Finally, stop and start the server for the changes to take effect.
  9. You can also BTM-enable a server/instance by editing the startup script of the target server/instance. For that, follow the steps below:

    • First, open the setDomainEnv.bat file (on Windows; on Unix systems, this will be the setDomainEnv.sh file).
    • Look for 'set JAVA_OPTIONS=' in the file, and append the code block you copied to the clip board at step 5 above to the JAVA_OPTIONS specification (see Figure 8).

      Figure 8 : Editing the setDomainEnv file of the target server/instance to BTM-enable it

    • Then, save the file.
    • Finally, stop and start the target server/instance.

BTM-Enabling a WebLogic Server Managed in an Agentless Manner

Follow the steps discussed hereunder to BTM-enable a WebLogic server that is monitored in an agentless manner:

  1. Login to the WebLogic server.
  2. Open a browser on the server, connect to the eG manager, and login to the eG admin interface.
  3. Manage the WebLogic server as a separate component using the eG administrative interface. When managing, make sure you set the Agentless flag checked.
  4. If multiple WebLogic server instances are operating on a single host, and you want to BTM-enable all the instances, then you will have to manage each instance as a separate component using the eG administrative interface. When doing so, make a note of the Nick name and Port number using which you managed each instance.
  5. Next, log out of the eG admin interface. Then, create a btm directory anywhere on the WebLogic server - say, C:\btm. Under this directory, create a sub-folder. Make sure that you name this sub-folder in the following format: <Managed_Component_NickName>_<Managed_Component_Port>. For instance, if you have managed the WebLogic server using the nick name weblogic1 and the port number 7001, the new directory under the btm directory should be named as weblogic1_7001.
  6. If you have managed multiple WebLogic 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.

  7. Once the new sub-directory(ies) is created, open a browser on the WebLogic server, connect to the eG manager, and login to the eG admin interface again.
  8. Follow the Agents -> BTM Profiler Download menu sequence in the eG admin interface.
  9. Figure 1 will appear listing the servers that can be instrumented for APM by eG. In this list, locate the WebLogic 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 WebLogic 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 9 : Downloading the APM Profiler Agent for the WebLogic server

  10. Upon clicking the Download icon in Figure 1, a zip file named javaagent_<Nick_name_of_WebLogic_server>_<Port_number_of_WebLogic_server will get downloaded. For instance, if you have managed the WebLogic server using the nickname 'weblogic1' and the port number '7001', then the name of the zip file will be javaagent_weblogic1_7001. Where multiple WebLogic server instances have been managed, you will be downloading multiple zip files - one each for every instance. The names of these zip files will automatically carry the nick name and port number you assigned to the corresponding server instance.
  11. Copy the downloaded zip file(s) to the corresponding sub-directory(ies) of the btm directory.  For example, the zip file named javaagent_weblogic1_7001, should be copied to the C:\btm\weblogic1_7001 directory .
  12. Extract the contents of each zip file into the same sub-directory to which that zip file was copied.
  13. Figure 10 depicts the extracted contents of the zip file.

    Figure 10 : Contents of the APM Profiler Agent zip

  14. From Figure 10, it is evident that the zip file contains an eg_btm.jar file and a few property files, namely - btmOther.props, btmLogging.props, config.props, custom.props, exclude.props, and threshold.props files.
  15. Then, you need to configure the WebLogic server/server instance with the path to the eg_btm.jar and .props files. The procedure to achieve this varies, depending upon the following:

    • Whether you want to BTM-enable a stand-alone WebLogic server/server instance
    • Whether you want to BTM-enable the Admin server of a WebLogic cluster
  16. To BTM-enable a stand-alone WebLogic server/server instance, first login to the WebLogic Administration console. Then, follow the steps detailed below:

    • When Figure 11 appears, click on the Servers link in the right panel.

      Figure 11 : Clicking on the Servers link

    • Figure 12 will then appear. Here, click on the server instance to be BTM-enabled.

      Figure 12 : Clicking on the server instance to be BTM-enabled

    • Figure 13 will then appear.

      Figure 13 : Viewing the configuration of the chosen server instance

    • Keep scrolling down the right panel of Figure 13 until the Arguments text box comes into view (see Figure 14).

      Figure 14 : Configuring the JVM arguments

    • In the Arguments text box, specify the following lines:

      -javaagent:<Path_to_eg_btm.jar_file>

      For instance, if the eg_btm.jar file and .props files are extracted into the C:\btm\weblogic1_7001 directory, the above specification will be:

      -javaagent:C:\btm\weblogic_7001\eg_btm.jar

      Likewise, if the eg_btm.jar file and .props files are extracted into a folder on a Unix system - say, /opt/btm/weblogic1_7001 - the above specification will be:

      -javaagent:/opt/btm/weblogic_7001/eg_btm.jar

    • Finally, save the changes and restart the WebLogic server.
  17. Where multiple instances of WebLogic are monitored, make sure you perform the sub-steps of step 16 above for each WebLogic server instance.
  18. To BTM-enable the Admin server of a WebLogic cluster, you need to edit the start-up script of the Admin server. For that, follow the steps below:

    • Login to the Admin server, open the start-up script, and insert the following lines in it:

      set EG_JAVA_OPTIONS_ADMIN_SERVER="-javaagent:<Path_to_eg_btm.jar_file>"

      if "%SERVER_NAME%"=="AdminServer" (

      set EG_JAVA_OPTIONS=%EG_JAVA_OPTIONS_ADMIN_SERVER%

      )

      set JAVA_OPTIONS=%JAVA_OPTIONS% %JAVA_PROPERTIES% -Dwlw.iterativeDev=%iterativeDevFlag% -Dwlw.testConsole=%testConsoleFlag% -Dwlw.logErrorsToConsole=%logErrorsToConsoleFlag% %EG_JAVA_OPTIONS%

      For instance, if the eg_btm.jar file and .props files are extracted into the C:\btm\WebLogic_7001 directory, the above specification will be:

      set EG_JAVA_OPTIONS_ADMIN_SERVER="-javaagent:c:\btm\WebLogic_7001\eg_btm.jar"

      if "%SERVER_NAME%"=="AdminServer" (

      set EG_JAVA_OPTIONS=%EG_JAVA_OPTIONS_ADMIN_SERVER%

      )

      set JAVA_OPTIONS=%JAVA_OPTIONS% %JAVA_PROPERTIES% -Dwlw.iterativeDev=%iterativeDevFlag% -Dwlw.testConsole=%testConsoleFlag% -Dwlw.logErrorsToConsole=%logErrorsToConsoleFlag% %EG_JAVA_OPTIONS%

      Figure 15 : Editing the start-up script of the WebLogic Admin server on Windows that is monitored in an agent-based manner

      Likewise, if the eg_btm.jar file and .props files are extracted into a directory on a Unix system - say, /opt/btm/weblogic_7001WebLogic_7001 directory - the specification will be as depicted by Figure 14.

      Figure 16 : Configuring the JVM arguments for a WebLogic server on Unix

  • Finally, save the file and restart the Admin server.

Verifying Whether/Not the WebLogic Server is Successfully BTM-Enabled

Once the –javaagent JVM option is added and server is restarted, look for the following.

  1. Open the application server’s standard output log file. Typically, this is the AdminServer.log file, which you will find in the C:\Oracle\Middleware\Oracle_Home\user_projects\domains\base_domain\servers\AdminServer\logs directory.
  2. Check for the presence of strings “[eG BTM]” and “BTM is ENABLED” in application server’s standard output. If the aforesaid text strings are found in the log file (as depicted by Figure 17), it implies that the –javaagent entry is taken and BTM is successfully enabled.

    Figure 17 : Verifying whether/not the WebLogic server has been successfully BTM-enabled