Architektur

Test Oracle Management Cloud Log Analytics with WebLogic Server

In this blogpost I will share my first experiences monitoring a Fusion Middleware environment with Oracle Management Cloud (OMC). For this test drive I used a WebLogic SOA Domain running on a Virtual Box image on my local machine.

OMC provides several components to monitor systems and infrastructures. I used the component Log Analytics. In order to upload log files from WebLogic Server to OMC an agent must be installed and configured on the target system. OMC defines different agent types with different responsibilities:

Agent Types

Agent Types

A gateway is an agent that acts as a channel between Oracle Management Cloud and data collector or cloud agents. Multiple data collector or cloud agents can communicate with Oracle Management Cloud through a single gateway.

A data collector is an agent that reads data from the customer’s on-premises Oracle Management Repository and uploads it to Oracle Management Cloud. A data collector also collects log information from entities.

A cloud agent collects the host, entity, and log data from the host where you deploy the cloud agent. It can connect to Oracle Management Cloud directly or through a gateway.

When using an agent you need a registration key. A registration key identifies the Oracle Cloud identity domain you have access to, and it is used to verify data sent by agents that are deployed on your on-premises hosts. You can use a single key for various agent installations. When you install an agent, you must provide the registration key value as a parameter. You can get the value of the key from the Agents screen of Oracle Management Cloud.

Prerequisites

In this example I used a cloud agent. When installing and configuring a cloud agent the following prerequisites must be satiesfied:

  • Dont’t use the root user for installation.
  • See more datails in [Documentation: Prerequisites for Installing Cloud Agents](https://docs.oracle.com/en/cloud/paas/management-cloud/emaig/prerequisites-installing-cloud-agents.html)

Install the OMC Cloud Agent

First download the agent binaries and prepare the installation. Afterwards run the agent installation.

Download Cloud Agent

1. Connect to OMC

2017 12 14 oracle management cloud loganalytics soa 1

2. Navigate to Administration > Agents

2017 12 14 oracle management cloud loganalytics soa 2

2017 12 14 oracle management cloud loganalytics soa 3

3. Navigate to tab „Download“ and select the entry „Cloud Agent“ from the dropdown list „Agent Type“

2017 12 14 oracle management cloud loganalytics soa 4

4. Download the agent for the target platform, like Linux (64-bit). The dialog also shows the TENANT_ID and UPLOAD_ROOT. These two values needed later in the agent registration step.

Install and prepare Cloud Agent on Target System

1. Lookup „Registration Key“ for the Agent. You can use an existing one or create a new key:

2017 12 14 oracle management cloud loganalytics soa 5

2. Copy the „Key Value“ for later usage when registering the Agent

2017 12 14 oracle management cloud loganalytics soa 6

3. Extract the distribution of the Agent to a folder on your machine

4. Open the response file INSTALL_DIR/agent.rsp with a text editor. Modify the following values:

2017 12 14 oracle management cloud loganalytics soa 7

Note: Grant write privileges to all folders in AGENT_BASE_DIRECTORY only to the owner! When for example the group has write privileges the agent installation will stop with an error!

5. Execute the installation script for the agent

Note: Ensure that only the owner has write permissions to the AGENT_BASE_DIRECTORY! Write permission on this directory for group and others aren’t allowed!

6. Enable the agent on startup. Run the following script as root:

7. Verify the Cloud Agent installation: Navigate to Administration > Agents > tab „Cloud Agents“.

2017 12 14 oracle management cloud loganalytics soa 8

or use the command line interface

Configure the Cloud Agent

After a successful installation of the Cloud Agent, you need to add entities that your Cloud Agent will monitor.

Defining Entities for Monitoring and Analysis

Entities are provided as JSON files. Samples for Log Analytics can be found in B Downloading and Customizing Oracle Log Analytics JSONs.

1. Download the samples and open the file omc_weblogic_domain_credless.json.

2. Modify the values in omc_weblogic_domain_credless.json with your domain information In the definition files, you need to replace the text within the < > brackets (along with the angular brackets themselves) with the correct values.

3. Run the following command to add the new entity:

4. Verify the status of an entity:

5. Verify agent is running and ready in the web interface or command line:

2017 12 14 oracle management cloud loganalytics soa 9

2017 12 14 oracle management cloud loganalytics soa 10

6. Verify the entity the entity configuration and modify the values if necessary

2017 12 14 oracle management cloud loganalytics soa 11

2017 12 14 oracle management cloud loganalytics soa 12

2017 12 14 oracle management cloud loganalytics soa 13

Analyse WebLogic Server Log Files

1. Navigate to Log Analytics > Log Explorer and see incoming diagnostics log entries from WebLogic Server

2017 12 14 oracle management cloud loganalytics soa 14

2. Filter the log entries by ECID

2017 12 14 oracle management cloud loganalytics soa 20

3. Trace a message flow by using a specific ECID

2017 12 14 oracle management cloud loganalytics soa 21

2017 12 14 oracle management cloud loganalytics soa 21

Summary

In this blog post I described how to get an insight about your WebLogic Server very easily with OMC.
However to get a full control of your environment several other steps are necessary:

  • Automate the OMC agent installation and configuration process, e.g. with Ansible.
  • Integrate the OMC agent in your network infrastructure (see Agent Types).
  • Build dashboards in OMC as you need for your particular use case.
  • Configuring alerts for automatic notification.

In the current world managing complex IT infrastructures in a centralized manner is the key. OMC can help to get control about your entire environment, but don’t underestimate the effort for such a huge project.