Traditionally, network and security systems logging is a trade-off between detail and efficiency.  At the rate data and log files are increasing, it’s impossible for administrators to correlate logging information and gain insight from it. Getting access, finding, and being able to read a variety of logs can also be a challenge.  

Some services with extensive database usage write logs directly into the database for various reasons, including data persistence, accessibility, and availability. One such database is the Oracle Autonomous Database, whose logs contain valuable troubleshooting information. The OCI Logging Analytics can gather and evaluate this specific type of log data.

Oracle Autonomous Database eliminates many administration tasks to help DBAs save time and effort. However, DBAs are still provided with a comprehensive collection of logs for instances where DBA knowledge and action are necessary.  In this blog, you’ll learn how to analyze the Oracle Autonomous Database logs using OCI Logging Analytics. By doing so, you can streamline the issue-resolution process, saving both time and effort.  We will share how you can collect data continuously from the Oracle Autonomous Database tables or views by connecting Logging Analytics to an Autonomous Database, installing an OCI Management Agent, and specifying the SQL queries that determine what data will be collected. Lastly, we will share four techniques to get the most out of your analysis using visualizations and other capabilities of OCI Logging Analytics. 

Collect Logs from Oracle Autonomous Databases

Before you start using the Logging Analytics service:

  • Set up the service policies for for this service.
  • Identify / create a log group to store logs you collect from your Oracle Autonomous Database.
  • Install the management agent on any host having JDBC connectivity to the Automation Transaction Processing (ATP-S) or Autonomous Data Warehouse (ADW-W) instances.
  • Ensure you’ve got access to the compartment in which your autonomous database resides in Oracle Cloud Infrastructure.
  • Have your database username and password ready.
  • Know the credentials to register with the management agent.
  • Be ready to provide the predefined service names for your autonomous databases when creating the autonomous database entity.

Now, let’s walk through a summary of steps on getting data collected from your autonomous databases:

  1. Download the Wallet Files

Set up Oracle Wallets to enable Management Agent connectivity to the autonomous database and to register with the management agent.

  1. Create the Autonomous Database Entity

Map your autonomous database on OCI to a Logging Analytics entity to reference your database instance and enable log collection from it. Specify Autonomous Data Warehouse or Autonomous Transaction Processing as the entity type. Ensure to document the entity name and service name that you provide. You will need them later to register with the management agent.

create entity

  1. Register the Database Credentials and Wallet Details with Management Agent

For the management agent to collect logs from the autonomous database entity, you need to provide the credentials so the autonomous database can be accessed. Also, register the wallet details with the agent.

  1. Create a Source for the Autonomous Database Entity in Logging Analytics.

Define the parameters such as the source type, entity type, and database SQL queries for the log source. The source must be of the type Database. You can map the SQL columns to the field names that are to be displayed in the actual log records.

Best practice is to run any SQL query outside of Logging Analytics to verify the results first.

ADB

  

  1. Associate the Source with Autonomous Database Entity

To begin collecting logs from the autonomous database, associate the autonomous database entity with the log source that you created earlier. After the association, the data starts collecting from the autonomous database entity in Logging Analytics.

ADB source

For full details on each of these steps, see Collect Logs from Tables or Views in Oracle Autonomous Database.

Work With Oracle Autonomous Database Log Data

After data has been collected, take a look at ways to use this data.

Visualize data in the Logging Analytics Log Explorer to gain greater insight

The Visualize panel presents search data in a form that helps you better understand and analyze it. See Visualize Data Using Charts and Controls for more details.

Perform advanced searches of data and run queries

The Logging Analytics Log Explorer user interface enables you to easily perform advanced searches of the data or search through database using queries. See more details in: Search any log and drill down to specific log entries to resolve problems quickly.

Save, reuse, automate your searches

Once you have a search setup, add them to your dashboard, automatically schedule them, and create alerts on them for reuse

Create and use dashboards to organize, consolidate, and visualize data 

Create, configure, and use dashboards to organize and visualize data to provide quick insights into the health and performance of your database systems, and help identify outliers and take corrective action.

For more details on these tasks, see the same tutorila mentione above, Collect Logs from Tables or Views in Oracle Autonomous Database.

Resources: