Deploying the Oracle Management Cloud Application Performance Monitoring agent on WebLogic

 

Application Performance monitoring is a powerful tool, for not only the developer, but also the DBA and system administrators that support the Infrastructure. It is one of the Oracle Management Cloud components, and it is the one that focuses on the application stack, and how end users are performing along with how the system that support the application are running.

Deploying the agent is not difficult, if you carefully follow the steps. You will need access to the WebLogic home directory.

Start from the WebLogic bin directory. If you are doing one of the labs, it will be 

/u01/app/oracle/product/middleware/user_projects/domains/base_domain/bin

Lets set the DOMAIN_HOME variable, it will make  it easier.

export DOMAIN_HOME=”/u01/app/oracle/product/middleware/user_projects/domains/base_domain/”

After the agent is installed we will need to edit the startup script to include the APM agent. IF your doing HOL “cd /u01/app/oracle/product/middleware/user_projects/domains/base_domain/bin” to take you to the directory with the startup.

Next we will export DOMAIN_HOME

export DOMAIN_HOME=”/u01/app/oracle/product/middleware/user_projects/domains/base_domain/”

 

Next we need  the registration key, this key is used to identify  your APM client to the OMC. You can get keys by logging into your cloud account, and user the Cloud Agents menu select Registration Keys.

image

export REG_KEY=M5750UCRC3xyzzyTdiEdBT03f3

 

Next we will install the APM agent, using the AgentInstall.sh, similar to how th4e cloud agent was installed on the host. The AGENT_TYPE is set to apm_java_as_agent, and the STAGE_LOCATION is set to a dirctory where the install files can be stages. Do not worry about the cURL error, TLS 1.2 is not enforced yet.

[oracle@clvmaster base_domain]$  /home/oracle/omc/AgentInstall.sh AGENT_TYPE=apm_java_as_agent STAGE_LOCATION=/var/tmp/stage
WARNING: The current cURL version 7.19.7 does not support TLS1.2 protocol; the downloader script will attempt to continue but may not work. Please install 7.49.1 or later versions of cURL for error-free execution.
Enter AGENT_REGISTRATION_KEY:
Downloading apm agent software …

 

Next lets cd to the stage directory.
[oracle@clvmaster base_domain]$ cd /var/tmp/stage

This direcotry holds the new installation scripts for java based application servers. First chmod +x the ProvisionApmJavaAsAgent.sh, this will aloow you to run the script.

 

[oracle@clvmaster stage]$ chmod +x ProvisionApmJavaAsAgent.sh

Next, we will install the Agent, passing the WLS home, and the –no-wallet parameter.

 

[oracle@clvmaster stage]$ ./ProvisionApmJavaAsAgent.sh -d ${DOMAIN_HOME} -no-wallet
*************************************************************************
Your settings are as follows:
          Agent Version = 1.15
              Tenant_ID = collaborate2017
               Hostname = clvmaster.labs.mythics.com
            Destination = /u01/middleware/Oracle_Home/user_projects/domains/base_domain
        RegistrationKey = EQAAAA9idWlsdEluQUxDS2V5LjE7SvcWO+lYKNy8PZGY3LSM
/T7oC2l0AdJ7k/9ONptlVYzTh4J1nhsPH7lEbX08LGIAAAAAR8yhMA==
Do you wish to proceed with these values? yes
Overwrite is enabled, Re-determine the hostname
Hostname to use is determined [hostname=clvmaster.labs.mythics.com]
Performing new installation
Archive:  /var/tmp/stage/ApmAgent-1.15.zip
   creating: apmagent/
   creating: apmagent/lib/
   creating: apmagent/lib/action/
  inflating: apmagent/lib/action/ApmProbeAction.jar
   creating: apmagent/lib/system/
  inflating: apmagent/lib/system/ApmProbeSystem.jar
  inflating: apmagent/lib/system/ApmAgentInstrumentation.jar
  inflating: apmagent/lib/system/instrumentor-2.2.0.2.jar
   creating: apmagent/lib/agent/
  inflating: apmagent/lib/agent/ApmProbeRuntime.jar
  inflating: apmagent/lib/agent/ApmAgentUtility.jar
  inflating: apmagent/lib/agent/ApmEumFilter.jar
  inflating: apmagent/lib/agent/commons-logging-1.1.1.jar
  inflating: apmagent/lib/agent/commons-codec-1.8.jar
  inflating: apmagent/lib/agent/jackson-mapper-asl-1.9.13.jar
  inflating: apmagent/lib/agent/jackson-core-asl-1.9.13.jar
  inflating: apmagent/lib/agent/jackson-jaxrs-1.9.13.jar
  inflating: apmagent/lib/agent/httpclient-4.2.5.jar
  inflating: apmagent/lib/agent/ApmAgentRuntime.jar
  inflating: apmagent/lib/agent/cmnutil.jar
  inflating: apmagent/lib/agent/jackson-xc-1.9.13.jar
  inflating: apmagent/lib/agent/jettison-1.3.4.jar
  inflating: apmagent/lib/agent/agentToEngine.jar
  inflating: apmagent/lib/agent/httpcore-4.2.4.jar
   creating: apmagent/config/
  inflating: apmagent/config/AgentHttpBasic.properties
  inflating: apmagent/config/AgentStartup.properties
  inflating: apmagent/config/BrowserAgent.json
  inflating: apmagent/config/Servlet.json
  inflating: apmagent/config/MetricCollector.json
*******************************************************************************

 

 

So far, so good! Now, one more thing to do, which you will perform manually.
You will need to modify your destination’s start up script so that
the APM instrumentation you have just laid down and configured will be invoked.

cd to the WLS bin directory and edit the startWeblogic.sh file. Next insert the following line right after the setDomainEnv section;

SAVE_CLASSPATH=”${CLASSPATH}”VA_OPTIONS=”${JAVA_OPTIONS} -javaagent:${DOMAIN_HOME}/apmagent/lib/system/\
ApmAgentInstrumentation.jar”

 

It should look similar to this;

 

Call setDomainEnv here.
DOMAIN_HOME=”/u01/middleware/Oracle_Home/user_projects/domains/
\base_domain”
. ${DOMAIN_HOME}/bin/setDomainEnv.sh $*
SAVE_JAVA_OPTIONS=”${JAVA_OPTIONS}”
SAVE_CLASSPATH=”${CLASSPATH}”VA_OPTIONS=”${JAVA_OPTIONS} -javaagent:${DOMAIN_HOME}/apmagent/lib/system/\
ApmAgentInstrumentation.jar”
TMP_UPDATE_SCRIPT=”/tmp/Update.sh”
export TMP_UPDATE_SCRIPT

 

Next stop the WLS server, and restart it;

./stopWebLogic.sh
nohup ./startWebLogic.sh >& startup.log &

 

 

In a few minutes, the server should now start reporting to APM.

 

Next you can log into APM and start exploring; The login page will show a lot of information about your application including the to server requests, where users are on a map, and the top pages, server requests and application servers.

SNAGHTML3018252

 

You can drill down into the page views, looking at each web page and checking for related errors and page load times that the users have experienced.

image

 

Also, experiment with looking at the application Server requests, showing response times, errors, and server information.

image

App Servers wil show your application servers, and metric important to an server admin, including garbage and heap details. You can also click on a server for more details.

image

 

Sessions allow you to see what an individual user did as they interact with your application.

image

Click on a session to see details for that session, down to even what their IP is, and how fats pages loaded, errors experienced and more.

image

 

 

Synthetic transactions are  a powerful tool, that allow you to play back pre-recorded test against your application, to baseline and monitor performance. You can record the file in a Java JUnit for WebDriver or a Java TestNG format  created with a free toll called Selenium.

 

image

 

 

Once a test is defined, you can monitor the long-term performance of the test, allowing you to baseline application performance, as well as detect problems when things break in the middle of the night.

image

 

 

There are a ton more options that Application Performance Monitoring can perform, play with the technology some and check out the other Oracle Management Blogs in the IOUG Cloud SIG 2017 Collaborate blog roll;

 

3 thoughts on “Deploying the Oracle Management Cloud Application Performance Monitoring agent on WebLogic

  1. Pingback: Oracle Management Cloud – Cloud Agent Install - Tales from the Datacenter

  2. I tried to setup the synthetic transactions and they do not run? Can you please help? Oracle sold this, but wants money to get it workiing.

Leave a Reply

Your email address will not be published. Required fields are marked *

*