Create Archive Policy

If you're using only the recent logs for your display and analysis tasks in Oracle Log Analytics, then create the archive policy to specify the number of days after which the logs must be moved to Oracle Cloud Infrastructure (OCI) Object Storage so that you can optimize the storage cost.

Note:

The Archive Policy feature is available only when your Oracle Management Cloud instance is running on Oracle Cloud Infrastructure.

Pre-requisites: Log in to your OCI Console > Tenancy Details page and have the OCI namespace information ready.

Create credential to establish connection and authenticate the access to OCI Object Storage. See Create Credential for OCI Authentication.

Additionally, note the details of the OCI compartment where the log data can be stored. To ensure data separation and to ensure access for select users of your OCI Object Storage, it is recommended that you create a separate compartment to store your archived log data from Oracle Log Analytics.

Ensure that the access policy for the OCI compartment is set such that you can store the log data from Oracle Log Analytics with the user credentials that you specify in the steps below. See Oracle Cloud Infrastructure Documentation Getting Started - Adding Users.

  1. From Oracle Log Analytics, click the OMC Navigation open menu icon icon on the top left corner of the interface. In the OMC Navigation bar, click Administration Home.

  2. In the Storage tile, click Manage Storage.

  3. Click the Archive Policy tab.



  4. Check the Enable Archive checkbox to enable the policy that you create.

  5. Hot Storage Age (Days): This is the count of the days after which the log data in the hot storage must be archived. The count is calculated based on the timestamp of the logs. For example, if your logs have the timestamp July 4, 2018 23:43:12, and you've specified the Hot Storage Age as 30, then the logs will be moved to archive storage on Aug 3, 2018.

    If you upload logs to Oracle Log Analytics that are older than the hot storage age, then they're not considered in the archive policy.

  6. Cold Storage Retention Period (Days): This is the number of days that the log data must remain in the archive storage after which it must be deleted. From the example in step 5, if the log data is archived on Aug 3, 2018, and you specified Cold Storage Retention Period as 365 days, then the archived logs are deleted from archive storage on Aug 03, 2019.

  7. Other Cold Storage Details: Enter the following information that you collected earlier:

    • Oracle.OCI.Auth Credential Name: The credential name that you provided in step 2.
    • OCI Region: This is auto-filled with the region where your Oracle Management Cloud instance is located.
    • OCI Namespace: Collect this from OCI.
    • OCI Compartment: Collect this from OCI.
  8. Click Test to verify that the information that you entered is valid. If the connection is not established with Oracle Cloud Infrastructure using the credentials provided, then modify the OCI account information accordingly.

    Click Save.

Note that if you purge the logs when they're in active use, then the logs won't be archived per the policy.