Use Oracle Log Analytics for Large Activity Stream Payloads
You can publish your activity stream logs to Oracle Log Analytics. This is useful if your activity stream payload is large, because Oracle Cloud Infrastructure (OCI) public logging limits the size of log files.
You must be subscribed to Oracle Log Analytics to publish your activity stream logs there.
If you later decide to stop storing activity stream logs in Oracle Log Analytics, you can disable it for your Oracle Integration instance. See Disable Storing Logs in Oracle Log Analytics
Create a Log Group to Store Your Logs in Oracle Log Analytics
To create a log group in Oracle Log Analytics to store your Oracle Integration activity stream logs, perform the following steps:
- In the Oracle Cloud Console, open the navigation menu and click Observability & Management, then, under Log Analytics, click Administration.
- On the Log Groups page, in the menu on the left, click Log Groups.
- Next to Applied filters, make sure you're viewing the compartment in which you want to create the log group.
- Click Create Log Group.
- Enter a name (for example,
OracleIntegration_ActivityStream_LogGroup) and description. - Click Create.
Create a Policy to Allow Log Uploads from Oracle Integration
To create a policy to allow log uploads from Oracle Integration, perform the following steps:
- If you haven't already done so, sign in to the Oracle Cloud Console.
- Get the client ID for your Oracle Integration instance:
- In the Oracle Cloud Console navigation menu, click Identity & Security, then, under Identity, click Domains.
- Open the domain in which you created your Oracle Integration instance.
If you don't see the domain, make sure you're in the correct region (in the banner) and you're viewing the correct compartment (in the filters).
- In the tabs across the top, click Oracle cloud services.
- Open your Oracle Integration instance.
If you have trouble finding your instance, searching for "Integration" might narrow down your choices.
- In the tabs across the top, click OAuth configuration.
- Scroll down to the General information section, and copy the Client ID.
- Create a dynamic group to be used in the policy:
- Go back to your domain by clicking Oracle cloud services at the top of the page.
- In the tabs across the top, click Dynamic groups.
- Click Create dynamic group.
- Enter a Name (for example,
OracleIntegration_LogAnalytics_DynamicGroup) and Description for the group. - In the Rule 1 box, enter the following rule.
Syntax:
resource.id='OracleIntegration_ClientID'
Where:OracleIntegration_ClientIDis the client ID you copied in step 2
Example:resource.id='A01BC23DE4567FGH89I0123456J78901_APPID'
- Create the policy:
- In the left navigation pane, click Policies.
- Click Create Policy.
- Enter a name (for example,
OracleIntegration_LogUploadPolicy) and description for the policy. - Click Show manual editor.
- Enter the following permissions.
Syntax:
allow dynamic-group DynamicGroup to {LOG_ANALYTICS_LOG_GROUP_UPLOAD_LOGS} in compartment LogGroup_Compartmentallow dynamic-group DynamicGroup to {LOG_ANALYTICS_SOURCE_READ} in tenancyallow dynamic-group DynamicGroup to use loganalytics-ondemand-upload in tenancyallow dynamic-group DynamicGroup to {LOG_ANALYTICS_LOG_GROUP_UPLOAD_LOGS} in tenancy
Where:DynamicGroupis the dynamic group you created in step 3LogGroup_Compartmentis the compartment in which you created the log group
Example:allow dynamic-group OracleIntegration_LogAnalytics_DynamicGroup to {LOG_ANALYTICS_LOG_GROUP_UPLOAD_LOGS} in compartment OracleIntegration_LogGroup_Compartmentallow dynamic-group OracleIntegration_LogAnalytics_DynamicGroup to {LOG_ANALYTICS_SOURCE_READ} in tenancyallow dynamic-group OracleIntegration_LogAnalytics_DynamicGroup to use loganalytics-ondemand-upload in tenancyallow dynamic-group OracleIntegration_LogAnalytics_DynamicGroup to {LOG_ANALYTICS_LOG_GROUP_UPLOAD_LOGS} in tenancy
Create a Policy to Allow Users to View Logs in Oracle Log Analytics
To create a policy to allow users to view logs in Oracle Log Analytics, perform the following steps:
- Create a group for the users you want to be able to view the activity stream logs in Oracle Log Analytics:
- In the left navigation pane, click Domains.
- Open the domain in which you created your Oracle Integration instance.
If you don't see the domain, make sure you're in the correct region (in the banner) and you're viewing the correct compartment (in the filters).
- In the tabs across the top, click User management.
- Scroll down to the Groups section, and click Create group.
- Enter a Name (for example,
OracleIntegration_LogAnalytics_Group) and Description for the group. - Add users to the group.
- Click Create.
- Create th policy:
- In the left navigation pane, click Policies.
- Click Create Policy.
- Enter a Name (for example,
OracleIntegration_LogAnalyticsAccessPolicy) and Description for the policy. - Click Show manual editor.
- In the editor, enter the following permissions.
Syntax:
allow group UserGroup to use loganalytics-features-family in tenancyallow group UserGroup to use loganalytics-resources-family in tenancy
Where:UserGroupis the group you created in step 1
Example:allow group OracleIntegration_LogAnalytics_Group to use loganalytics-features-family in tenancyallow group OracleIntegration_LogAnalytics_Group to use loganalytics-resources-family in tenancy
Enable the Option to Publish Logs to Oracle Log Analytics
To enable storing Oracle Integration activity stream logs in Oracle Log Analytics, perform the following steps:
- Get the OCID for the log group you created:
- In the Oracle Cloud Console navigation menu, click Observability & management, then, under Log analytics, click Administration.
- In the left navigation pane, click Log Groups.
- Next to the log group you created for Oracle Integration, click
, then click Copy OCID.
If you don't see the log, make sure you're viewing the correct compartment (in the left menu).
- Enable the option:
- In the Oracle Cloud Console navigation menu, click Developer Services, then, under Application Integration, click Integration.
- Open your Oracle Integration instance.
If you don't see the instance you're looking for, make sure you're viewing the correct region (in the banner) and compartment (at the top of the instance list, next to Applied filters).
- Under Settings, next to Store activity stream logs in OCI Log Analytics, click Enable.
- Paste the OCID you copied into the OCI Log Analytics log group box, and then click Save.
The service instance status changes to Updating. When it's finished, the status changes to Active, and, under Links, you see a new entry for OCI Log Analytics log group, which shows the log group OCID.
Disable Storing Logs in Oracle Log Analytics
If you want to stop storing activity stream logs in Oracle Log Analytics, you can disable it for your Oracle Integration instance.
- In the Oracle Cloud Console navigation menu, click Developer Services, then, under Application Integration, click Integration.
- Open your Oracle Integration instance.
If you don't see your instance, make sure you're viewing the correct compartment (in the left menu).
- Under Settings, next to Store activity stream logs in OCI Log Analytics, click Disable.
You'll be asked to confirm your action.
The service instance status changes to Updating. When it's finished, the status changes to Active, and Store activity stream logs in OCI Log Analytics shows Not enabled.