Purge Log Data

Oracle Log Analytics lets you purge log events that were loaded by agent or by an on-demand upload to reduce the index size of the log data. Oracle Log Analytics billing depends on the amount of log data indexed.

Purging enables you bring down your usage to reduce overage charges. Oracle Log Analytics can purge log data automatically per a set schedule or manually based on your need.

There are multiple ways to purge log data.

  • By specifying the time and date: All data from all buckets created prior to the selected time range gets purged.
  • By creating a purge policy: The old log data can be purged by specifying a schedule for purging and the query to filter the data to purge.
  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. On the Manage Storage page, you can purge log data in one of the following methods:
    • Click Purge By Time tab. Select the date and time prior to which the log data that must be purged was collected. The log data from all the buckets prior to the selected time period gets purged.

      In the Query field, enter the query to select a specific set of log data. For example, to select the logs from the entities of the type Linux (Host), specify the query *'Entity Type'='Linux (Host)'. Click the help icon Help icon. to see more examples of the queries.

      Click Estimate to determine the size of the storage that can be reclaimed based on the selection you made in the previous fields.

      Click Purge Data.

    • Click Purge By Policy tab. If you want to automate the purge activity, then you can create a purge policy by specifying the purge schedule, selecting the log data to purge, and enabling the policy.

      Click Create New Policy. The Create Purge Policy dialog box opens.

      Enter a name for the new purge policy.

      Under Purge Data Older than, select the time period from when the log data must be purged.

      Under Schedule Interval, select the periodicity, day, and time of the purge action.

      In the Query field, enter the query to select a specific set of log data. For example, to select the logs from the log source Apache HTTP Server Access Logs, specify the query 'Log Source'='Apache HTTP Server Access Logs'. Click the help icon Help icon. to see more examples of the queries.

      Click Save.

      The purge policy is enabled. To edit or disable the policy, click Actions icon next to the policy name.