You can use the console to set the agent properties for Logging Analytics log collection at various levels of
hierarchy, tenant level being the highest.
You can set the agent properties at any of the following levels listed
in the order of hierarchy. For the navigation instructions to edit the agent properties,
follow the link next to the level.
The property value applied at a higher level is applicable to all the lower
levels. The agent property set at lower level takes precedence if the same
property is set at multiple levels.
At all the above levels, navigate to the dialog box where the
agent properties for that source type are listed by following the steps in the
corresponding section for each level type. The table in the dialog box displays the
current value of each property. Hover the cursor on the info icon to know what the default value is.
In the New Value field, enter the new value for the
property that you want to modify. Ensure that the data type of the value is
as specified. For the list of properties you can modify for each source
type, and their corresponding data types, see Agent Properties that You Can Modify.
To change the property to the default value, click Actions menu icon and select Reset to default.
To clear the current value of the property, click Actions menu icon and select Clear current value. If you
clear the current value, then the new value is inherited. The new value is
displayed in the table after you save the current changes and reopen this
dialog box.
Save the changes.
Modify Agent Properties at
Tenancy Level
The changes you make at this level are going to reflect on the agents
across the tenancy.
Open the navigation
menu and click Observability & Management. Under
Logging Analytics, click
Administration. The Administration
Overview page opens.
The administration resources are listed in the left hand
navigation pane under Resources. Click
Service Details.
Next to Global Agent Collection Properties, click
Edit. The Edit Global Agent Collection Properties dialog
box opens.
Select your Source Type. Depending on the source type you
select, the properties that you can modify are listed in the table.
Modify Agent Properties at Agent Level
The changes you make at this level are going to reflect on the entities
and sources managed by the specific agent.
Open the navigation
menu and click Observability & Management. Under
Logging Analytics, click
Administration. The Administration
Overview page opens.
The administration resources are listed in the left hand
navigation pane under Resources. Click
Entities.
The Entities page opens. Filter the entities by
specifying the type as Management Agent.
The agent entities are listed.
Click the name of the agent entity. The Entity Details page
opens.
Next to Global Agent Collection Properties, click
Edit. Select your Source Type. The agent properties that
can be modified for that source type are listed in the table.
Modify Agent Properties for a
Specific Source
The changes you make at this level are going to reflect on all the
entities associated with this source and the source patterns.
Open the navigation
menu and click Observability & Management. Under
Logging Analytics, click
Administration. The Administration
Overview page opens.
The administration resources are listed in the left hand
navigation pane under Resources. Click
Sources.
The Sources page opens. Click the Actions menu icon
next to the source, and select Edit.
The Edit Source page opens.
Click Show Agent Collection Properties. The agent
properties that can be modified for that source type are listed in a table.
Modify Agent Properties for a
User-created Source Pattern
The changes you make at this level are going to reflect on all the
entities associated with this source that use the specific source pattern which is
user-created.
Open the navigation
menu and click Observability & Management. Under
Logging Analytics, click
Administration. The Administration
Overview page opens.
The administration resources are listed in the left hand
navigation pane under Resources. Click
Sources.
The Sources page opens. Click the Actions menu icon
next to the source, and select Edit.
The Edit Source page opens.
Next to the user-created pattern of your source, click the
Actions menu icon and click Edit Collection Properties. The
agent properties that can be modified for that source type are listed in a
table.
Modify Agent Properties for an
Entity
The changes you make at this level are going to reflect on the specific
agent entity and the associations of the agent entity with the sources.
Open the navigation
menu and click Observability & Management. Under
Logging Analytics, click
Administration. The Administration
Overview page opens.
The administration resources are listed in the left hand
navigation pane under Resources. Click
Entities.
The Entities page opens. Filter the entities by
specifying the type as Management Agent.
The agent entities are listed.
Click Actions menu icon next to the name of the agent entity and click Edit. The
Edit Entity dialog box opens.
Click Show Agent Collection Properties. Select your
Source Type. The agent properties that can be modified for that
source type are listed in the table.
Modify Agent Properties at
Source-Entity Association Level
The changes you make at this level are going to reflect on the specific
agent entity associated with the source.
Open the navigation
menu and click Observability & Management. Under
Logging Analytics, click
Administration. The Administration
Overview page opens.
The administration resources are listed in the left hand
navigation pane under Resources. Click
Sources.
The Sources page opens. Click the name of the source to
open the source details page.
The agent entities associated with the source are listed in the
table.
Click Actions menu icon next to the name of the agent entity and click Edit
Association. The Edit Association dialog box opens.
Click Show Agent Collection Properties. The agent
properties that can be modified for that source type are listed in the
table.
Agent Properties that You Can
Modify
Property
Source Type Supported
Data Type
Applicable Levels
Description
Value Range
Timezone
File, Database, Oracle Diagnostic Log (ODL), REST
API
String
All levels
Time zone value in formats supported by
java.util.TimeZone; Example: GMT. If
this property is not provided, the agent tries to determine it from
log file content. Otherwise it picks up agent's timezone (which is
GMT by default).
Time zone value in formats supported by
java.util.TimeZone
Maximum old rows to fetch in one log collection
cycle; Example: 1000000
Positive number including zero
Status Cleanup Time Window
REST API
Integer
Tenant, Agent
Time window indicating how much old status files to
clean; Format: ISO 8601; Example: P7D.
Greater than zero
Historical Data
REST API
String
Tenant, Agent, Entity
Time representing how much older records to fetch;
Format: ISO 8601; Example: P30D.
If only a number is provided, then the agent will
default to days. Example: 30 will default to
30d.
Historical data can be provided as entity at log rule
level
To specify number of days for collecting data over
the previous 30 days: 30d. You can also specify
hours (h) and minutes (m). Example: 12h,
30m. You can also provide the exact
timestamp in the format
"yyyy-MM-dd'T'HH:mm:ss.SSSZ". Example:
2001-07-04T12:08:56.100-0700
Enable Filter Duplicate Records
REST API
Boolean
All levels
Enable filtering of duplicates; Example:
true.
-
Maximum Log Record Length
Syslog Listener
Integer
All levels
Maximum syslog message log length in kilobytes;
Example: 64.
1-640
Manually Specify Time Zone and
Character Encoding for Files 🔗
You can manually specify the properties for the log files by editing the
configuration properties in the agent installation folder.
You can perform this task for all the logs except the Windows events.
If you want to apply the properties on specific patterns and / or log
sources, then make a note of the pattern ID and the source ID. Open the config
xml file under the agent installation folder
agent_inst/state/laStorage/os_file/os_file.xml.
Pattern ID example: <Pattern id="495071102827757094"
name="/tmp/w*.mgr" include="true">
Source ID example: <LogSource
id="-2574377491167724513" name="SS Concurrent Manager Logs"
sourceType="os_file"/>
The agent installation folder location varies depending on the source type. For
example, the location is
agent_inst/state/laStorage/database_sql/database_sql.xml for SQL
Database.
Edit the properties file emd.properties in the location
agent_inst/config/emd.properties and add the following property to
override the default configuration of Oracle Logging Analytics:
loganalytics.src.override_config=true
Specify the time zone tz and character encoding
enc properties in the file emd.properties by
selecting from one of the following examples:
Apply the properties for all the sources and patterns:
In this example, the time zone UTC and
character encoding EUC-JP properties are applied for
the source -2574377491167724513, and character encoding
property UTF-8 is applied for the source
-2574377491167724512.
In this example, the time zone UTC and
character encoding EUC-JP properties are applied for
the pattern 495071102827757094, and character encoding
property UTF-8 is applied for the pattern
495071102827757095.
Apply the properties only for a combination of specific
patterns and sources:
In this example, the time zone UTC and
character encoding EUC-JP properties are applied for
logs with the pattern 495071102827757094 and the source
-2574377491167724513, and character encoding
property UTF-8 is applied for logs with the pattern
495071102827757095 and the source
-2574377491167724513.
Configure Database SQL Collection
Schedule 🔗
You can customize the SQL collection schedule for each of your database log
sources by specifying the periodicity in a CSV file in the format specified below.
Navigate to the Management Agent or Oracle Cloud Agent install directory on your
database host, for example agent_inst. Create a directory
laconfig in the agent install directory.
In laconfig directory, create a CSV file
logan_schedule_database_sql_*.csv. This is the
schedule configuration file.
In the schedule configuration file, provide the details of the source schedule in
the following format:
The header row must have the prescribed content:
NAME,RECURRENCE_PATTERN_UNIT,RECURRENCE_PATTERN_VALUE,START_HOUR
In the subsequent rows, specify the schedule for each source, one per row.
The header row parameters and their values:
Header Row Parameter
Description
Allowed Values
NAME
The name of the database log source defined in Oracle Logging Analytics.
Any
RECURRENCE_PATTERN_UNIT
This is the unit of cadence of SQL collection, for example,
minutes or days.
WEEK and MONTH can have multiple values
separated by :
MIN: minutes
HOUR: hours
DAY: days
WEEK: weeks
MONTH: months
RECURRENCE_PATTERN_VALUE
The value of the pattern unit you selected.
MIN: interval 5 min, 15 min
HOUR: interval 1 hour
DAY: daily running at 1, or 12
WEEK: SUN, MON, TUE,
WED, THU, FRI, SAT
MONTH: date 1-31, LAST day of the
month
START_HOUR
The start hour for SQL collection, for example, 0100 hrs or
1200 hrs.
If this value is not specified, then the SQL collection
begins immediately after source-entity association. Note
that, even if the value is not specified, the preceding
comma must be present in the row for the schedule to be
valid.
1 or 12.
After saving the CSV file, restart the agent.
Some of the example values for the schedule configuration:
Source Row Content
Description
<Source-Name>,MIN,5,
Schedule the SQL query every 5 min starting from source-entity
association time.
<Source-Name>,HOUR,1,
Schedule the SQL query every hour starting from source-entity
association time.
<Source-Name>,DAY,1,1
Schedule the SQL query every day at 0100 hrs system time.
<Source-Name>,DAY,1,12
Schedule the SQL query every day at 1200 hrs system time.
<Source-Name>,WEEK,FRI,1
Schedule the SQL query every week on Friday at 0100 Hrs system
time.
<Source-Name>,WEEK,WED:THU,1
Schedule the SQL query every week on both Wednesday and Thursday at
0100 Hrs system time.
<Source-Name>,MONTH,7,1
Schedule the SQL query every month on Date 7 at 0100 Hrs system
time.
<Source1-Name>,MIN,5,
<Source2-Name>,DAY,1,1
Associate the Source1 first with the entity and wait for log
collection to start and then update the configuration by adding the
association of Source2 with the same entity
Enable Log Collection from Large
Folders 🔗
Folders containing more than 10,000 files may cause high resource (memory /
storage / CPU) usage by the Management Agent which may lead to slow log collection, affect
other functionalities of the Management Agent, and may also slow down the host
machine.
When large folders are encountered by the Management Agent Logging Analytics plug-in, a
message similar to the following example message is added to the Management Agent
mgmt_agent_logan.log file:
2020-07-30 14:46:51,653 [LOG.Executor.2388 (LA_TASK_os_file)-61850] INFO - ignore large dir /u01/service/database/logs. set property loganalytics.enable_large_dir to enable.
Note
We recommend avoiding large folders. Utilize a cleanup mechanism to remove files soon
after they are collected so that the Management Agent would have sufficient time to
collect them again.
However, if you want to continue monitoring logs in large folders, then you can enable
the support by making the following changes.
You can manually edit the configuration property
loganalytics.enable_large_dir to true in the agent
installation folder to enable the collection of logs from folders having more than 10000
files. By default, the property value is false.
Edit the properties file emd.properties in the location
agent_inst/config/emd.properties and add the above property value to override
the default configuration of Oracle Logging Analytics:
Replace INSTALL_DIRECTORY with the path to the
agent_inst folder. Restart the management agent after editing the
file emd.properties.
You may have to make some configuration changes on your host agent to enable
this support. Try the new settings in a development or test environment before making
them in production. Determine the increase for the following factors by using a
representative environment to test them. The actual required increase will depend on
factors such as the number of files, rate of file creation, and the other types of
collection that the Management Agent is doing.
Increase the heap size of the Management Agent. For directories with a large number
of files, the required heap size increases with the number of files. See Management Agent documentation.
Ensure that sufficient disk space and inodes are available for handling the large
number of state files that the Management Agent may have to keep. This depends on
the type of log source and parser used. If your parser uses the Header-Detail
function, then the agent creates and stores the header in a cache file as long as
the original log file exists.
Ensure that the operating system setting for the number of open files can support
the Management Agent reading the large folder and potentially large number of state
files.
Use Macro for Case-Insensitive Match of Log
File Path 🔗
Use the ignore-case macro (?i) in the log file path pattern
to interpret it in the case-insensitive form. This is applicable for log file path pattern
provided in log sources of the type File .
The macro (?i) will be applied only when it is in the start of the
element of the path.
Consider the example:
/tmp/(?i)FOO/*.log
In the above example, the element of the path which follows the macro is
FOO. This is interpreted in the case-insensitive form.
Note
If the value of a property contains the slash character
/, then care must be taken to ensure the proper use of
ignore-case macro. For example, if the entity property is
logdir=/tmp/logs/, the log source file path pattern is
(?i){logdir}/foo.log, and the ignore-case macro is
applied on it, then the log source file path pattern is interpreted as
(?i)/tmp/logs/foo.log which is not the desired
result.
In such cases, add multiple properties that are case-insensitive and build the log
pattern path from them using the ignore-case macro.