Best Practices from Oracle Development's A‑Team

Configure Oracle Management Cloud (OMC) with ATG Commerce


This post will cover the steps required to add Oracle ATG Commerce monitoring to Oracle Management Cloud(OMC).

The steps described will be geared towards running ATG with WebLogic server.


In order to follow the steps in this post, you will need to already have an OMC environment.

It is also assumed you have a running instance of the Commerce Reference Store on linux, and processes are owned by the oracle user.

This post is not meant to describe all the possible configurations and setup steps with OMC.

Setup process

This setup process assumes a single server running the Commerce Reference Store(CRS).

Install cloud agent

Prep log access by setting ACL's on system log directories. The OMC agent will be running as the oracle user, and system logs will by owned by, and only readable by, root in many cases. ACL's allow the Oracle user, and the OMC agent to read log files.

Depending on your specific operating system and OS setup, not all of these directories will exist.

setfacl -m u:oracle:r /var/log/yum.log
setfacl -m u:oracle:r /var/log/messages*
setfacl -m u:oracle:r /var/log/cron*
setfacl -m u:oracle:r /var/log/audit/audit*
setfacl -m u:oracle:r /var/log/secure*
setfacl -d -m u:oracle:r /var/log
setfacl -d -m u:oracle:r /var/log/audit
  • Download the cloud agent installer from your OMC domain, and copy to the server running the CRS
  • On the server running the CRS, create the directory /u01/omc
  • Unzip the cloud agent installer to /u01/omc
  • Install the cloud agent by executing the following as the oracle user, filling in the correct value for your OMC registration key:
    • /u01/omc/AgentInstall.sh AGENT_TYPE=cloud_agent AGENT_REGISTRATION_KEY=<YOUR_OMC_KEY> AGENT_BASE_DIR=/u01/omc/cloud_agent
    • Follow any post install instructions from the installer.
    • Edit /u01/omc/cloud_agent/plugins/oracle.em.sgfm.zip/1.20.0/configs/discovery.properties
      • Note that the version number may be different (1.20.0). Adjust accordingly
      • Comment out the line disable_monitoring_for_entitytype=omc_host_linux and save the file. This tells the agent to monitor this host, and that it is linux based.

Add log monitoring to your host

                        "name": "atg112.compute-ateamatgpoc3.oraclecloud.internal",
                        "type": "omc_host_linux",
                                "capability": {
                                "displayName": "capability",
                                "value": "monitoring"
  • Create the file /tmp/update_host_sample_1.14_and_on.json and add the following data
    • You will need to update the value of the name property with your fully qualified domain name for the host CRS is running on.
  • Execute /u01/omc/cloud_agent/agent_inst/bin/omcli update_entity agent /tmp/update_host_sample_1.14_and_on.json

Install Application Monitoring Agent (APM)

APM agent - preprocessing initialized
APM agent - log directory location is /u01/middleware/user_projects/domains/base_domain/apmagent/logs/ATGPublishing
  • Install the APM agent by executing the following as the oracle user, on your host running CRS. Fill in the correct value for your OMC registration key
    • /u01/omc/AgentInstall.sh AGENT_TYPE=apm_java_as_agent STAGE_LOCATION=/u01/omc/apm_staging AGENT_REGISTRATION_KEY=<OMC_REG_KEY> -download_only
  • cd to /u01/omc/apm_staging
  • execute chmod +x ProvisionApmJavaAsAgent.sh
  • execute /u01/omc/apm_staging/ProvisionApmJavaAsAgent.sh -d /u01/middleware/user_projects/domains/base_domain
    • The value after -d is the path to your Weblogic DOMAIN_HOME. Adjust if necessary.
  • Make a backup of /u01/middleware/user_projects/domains/base_domain/startWebLogic.sh
  • Edit /u01/middleware/user_projects/domains/base_domain/startWebLogic.sh
    JAVA_OPTIONS="${JAVA_OPTIONS} -javaagent:${DOMAIN_HOME}/apmagent/lib/system/ApmAgentInstrumentation.jar"
    • Look for the line in startWebLogic.sh that calls setDomainEnv.sh. It will look something like ". ${DOMAIN_HOME}/bin/setDomainEnv.sh $*"
    • Directly after this line, add
  • In your Weblogic DOMAIN_HOME, edit apmagent/config/AgentStartup.properties
  • Add oracle.apmaas.agent.browser.copyBuffer=true and save the file
  • Restart your WebLogic admin server and managed servers
  • In your managed server logs, you should see entries similar to the following, telling you the APM agent has been started:

Add APM monitoring to your WebLogic domain

The following section will show JSON configuration files to enable WebLogic Domain monitoring in APM. The APM documentation contains links to sample JSON configuration files for other monitoring types.

  "entities": [{
    "name": "atg_weblogic",
    "type": "omc_weblogic_domain",
    "displayName": "atg_weblogic",
    "credentialRefs": ["WLSCreds"],
    "timezoneRegion": "America/New_York",
    "properties": {
      "port": {
        "displayName": "Port",
        "value": "7001"
      "protocol": {
        "displayName": "Protocol",
        "value": "t3"
      "admin_server_host": {
        "displayName": "Admin Server Host",
        "value": "atg112.compute-ateamatgpoc3.oraclecloud.internal"
      "capability": {
        "displayName": "capability",
        "value": "monitoring"
  • Create /tmp/omc_weblogic_domain_sample.json with the following data
  • Adjust the value of timezoneRegion to match your timezone if needed.
  • Adjust the value of Port to match the port of your WebLogic admin server if needed.
  • Adjust the value of admin_server_host to match the fully qualified domain name of the host CRS is running on
  "credentials": [{
    "id": "WLSCreds",
    "name": "DomainCredsMonitoring",
    "credType": "MonitorCreds",
    "properties": [{
      "name": "user_name",
      "value": "CLEAR[weblogic]"
    }, {
      "name": "password",
      "value": "CLEAR[WL_PASSWORD]"
  • Create /tmp/omc_weblogic_domain_sample_creds.json with the following data

Adjust the value of user_name to match your WebLogic admin user. Only replace the text within the brackets. The actual brackets must remain.

Adjust the value of of password to match your WebLogic admin users password. Only replace the text within the brackets. The actual brackets must remain.

Execute /u01/omc/cloud_agent/agent_inst/bin/omcli add_entity agent /tmp/omc_weblogic_domain_sample.json -credential_file /tmp/omc_weblogic_domain_sample_creds.json

Add ATG log monitoring

The following is the process to extract ATG log data from the WebLogic standard out files. This process can be replicated to extract data in other formation. Changing the parse expression and field mappings can accommodate other log formats.

  • In OMC console, go to Log Analytics -> log admin -> log parsers
  • Create a new log parser
  • Give the parser a name - i.e. ATG
  • Log Delimiter is always one per entry
  • Add some sample log data from an ATG log
  • Set the parse expression to:
  • Set field mappings as follows:
    • 1 - severity
    • 2 - milliseconds
    • 3 - component
    • 4 - message

Screenshot example of filled in fields:


  • Test the parser by clicking "Parser test" link. If the result does not look correct, check your parser expression and sample log data. The test uses the sample data you pasted in the previous steps.
  • Screenshot of successful parser test:
  • test-parser

Create a log source for your parser

The log source and parser will be associated together. This log source is where the parser you just created will get its data from. You may noticed the parser source is the WebLogic standard out files, which are also used by other OMC parsers. Each parser extracts content in a specific format. Since the ATG log data is not in the same format as WebLogic stdout data, you need this specific parser.

  • Go to create log source
  • Give it a name i.e. ATG
  • Source type is File
  • Entity type is WebLogic Server
  • File parser is the parser you just created. Start typing the name and select your parser. ATG if you following this post.
  • File pattern is the logs that will be read. Enter:
  • Auto associate is optional. By selecting this, all WebLogic servers will be associated to the ATG log parser you created.

Screenshot of creating your log source:



  • To manually associate your new parser and log source to an entity, go to entities in your OMC log console.
  • Select the entity you want to associate to. For example, select your ATGProduction WebLogic instance.
  • Click Add, and select ATG.
  • Screenshot of adding the log source:
  • associate-source

Add ATG applications to APM

The following steps add monitoring for specific ATG applications - CRS and the BCC.

  • Go to APM admin
  • Select Application Definitions
  • Create a new application
  • Give it a name - i.e. CRS
  • Select pages as the content source
  • Set criteria to URL contains <ip address>:<port> of your CRS ATG instance
  • Example screenshot:
  • add-crs-app
  • You can also monitor BCC traffic following the same steps, but changing the name to BCC, and the URL to containing the ip and port of your BCC instances.
  • If you want to monitor multiple context root on the same application server, you can add the context root to the contains URL. For example,

Create synthetic test to monitor app performance

  • Go to APM admin
  • Select synthetic tests
  • Create new test
  • Set type to page load
  • Give the test a name
  • Set the URL to your ip and port, with the context root for your CRS application.
  • Set the location to the cloud datacenter(s) you would like your test to run from. Depending on your account and domain location, you may have access to different options here. You can run the test from one or many datacenters.
  • Set application to the application you defined in the last step. Following this post, it would be CRS.
  • Set the test internal.
  • Save

This test will now periodically run, and report performance and availability data to your APM console.

Screenshot of test config:


Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.Captcha