Oracle Management Cloud has several services for operational management and analysis of applications, platform and infrastructure components. Among the platform components that we can monitor are of course JCS instances – WebLogic in the Oracle Public Cloud. OMC provides a platform for gathering, retaining and analyzing metrics and log data collected from across many platforms and infrastructure components, both in the cloud and on premises. OMC works with agents that are provisioned on the components to be monitored; these agents send metrics and logging to the central OMC instance.

At the moment, the OMC agents are not automatically deployed and configured when a new instance of JCS or DBaaS is provisioned. I would expect Oracle to very shortly provide that option, at least as part of a cloud stack. That means that we have to take care of our own provisioning on JCS of the Cloud Agent that collects and posts the log file entries to OMC Log Analytics (and likewise the APM Agent). The steps are similar to the actions that need to be taken on premises.

I will briefly discuss the steps I took and the experiences I had. I had assistance from my colleagues Job Oprel and Eugene van der Voort and also from Oracle’s Mahesh Sharma.

Preparation

We need SSH access to the Oracle Compute VM that runs the WebLogic Domain. That means we need the private key for the SSH Key Pair of which the Public Key was uploaded to Oracle Cloud during configuration of the JCS provision job and also the public IP address for the VM.

We need a way to copy a file (the AgentInstaller, downloaded from OMC Console) to the VM. I used a tool called MobaXTerm (see MobaXTerm) for this on Windows (it provides sftp over SSH channels)

We need the name of the WebLogic Domain and the names of the managed server(s); the name of the admin server is <domain_name>_adminserver. We also need the name of the host of the WebLogic Domain – in my case amispaas-db-java-stack-jaas-wls-1.compute-amispaas.oraclecloud.internal. Finally, we need the listen ports and SSL listen portsfor the admin server (JCS default is 9071 and 9072) and the managed servers (the first managed server listens at port 9073 and 9074 by default).

We need the Web Logic Domain Home (available in EM FMW Control, on JCS defined as: /u01/data/domains/<name of domain>) and the WebLogic Home (Oracle software installation home, typically under the Fusion Middleware Home; on JCS set to: /u01/app/oracle/middleware/wlserver).

Configuration of the Cloud Agent on JCS

Download the Agent Installer from OCS. On the OCS Agents Tab, on the Download sub tab, click on the download link. This will download a file called AgentInstall.zip.

Click on the subtab Registration Keys. Create a registration key if you do not have one yet. Copy a registration key to scratch pad or temp file; you will need to use that key later on. You can also download the key in a text file.

Open an SSH session to the Compute VM. You need to provide public ip address, private key and possibly the passphrase associated with the private key file. The SSH session is always connected as opc.

Extract the file AgentInstall.sh from the zip file downloaded from OMC. Copy the file to the Compute VM. My steps:

from my laptop: copy AgentInstall.sh to home directory for user opc (using MobaXTerm drag and drop from laptop to MobaXTerm)

copy AgentInstall.sh to /tmp (to make it accessible to user oracle)

alternative: put AgentInstall.sh on Dropbox or something similar and use wget https://dl.dropboxusercontent.com/u/<your id>/AgentInstall.sh to fetch the file to the Compute cloud

Note: instead of downloading and installing in once action, which can also be done, I chose to go about this in two stages. The main reason: my first attempt was in one step; then the process seemed to be stuck on downloading and I aborted the attempt.

The previous command will write a single line of feedback:

‘Downloading lama agent software…’

This download took very long for me. After several minutes (and without any further feedback), the download is complete ( with ps -ef | grep AgentInstall I verified that the process was no longer running). It case created two files in directory omc_cloudstage:

Navigate to omc_cloudstage:

cd omc_cloudstage

and run this command that will provision the cloud agent from the stages download:

At this point, no logging is actually flowing to the OMC cloud. The entities currently listed as targets are however already visible, with some associated log sources (in Log Analytics console, click configuration):

Configuring the Entities to Collect Logging For

The documentation provides instructions on adding entities – the actual platform components that logging is to be collected for. For example an Oracle Database, a WebLogic Domain or a WLS Managed Server. Using the omcli tool and a JSON file format for specifying the components, the entities are added. Based on the attributes provided for these entities and the built in knowledge in the cloud agent about the log files written to by the entity type indicated, the cloud agent knows which files are to be harvested for log entries that are sent to the OMC cloud.

I have created a JSON file weblogic_amispaas.json for registering the WebLogic Domain and the Admin server: