View source | Discuss this page | Page history | Printable version   
Toolbox
Main Page
Upload file
What links here
Recent changes
Help

PDF Books
Add page
Show collection (0 pages)
Collections help

Search

Logs Clean Up

Contents

Overview

Bulbgraph.png   This utility is included and preconfigured starting from PR15Q2. In previous releases it can be installed as external community module: [1].

Log tables are database tables that are used by Openbravo to keep logs. Usually these logs are no valuable after some period of time, but if they are not cleaned up they can cause database to increase it volume over time.

Default configuration

Openbravo provides a default standard configuration (see more details about Configuration in next section).

This configuration cleans the following tables up with the defined frequency:

Table Keep records newer than n days/Filters Notes
AD_PInstance 15 days Keeps track of process executions, deletions in this table cause also deletions in AD_PInstance_Para which stores information about parameter values used in each execution.
AD_Process_Request 15 days, only for completed requests Table used to schedule processes, it typically grows up with immediate executions.
AD_Process_Run
  • 15 days for successful executions
  • 30 days for executions with error
Keeps information of executions of background scheduled processes
AD_Session 40 days Stores a record per each session in Openbravo. Deleting this table causes also deletions on AD_Session_Usage_Audit

Retail instances also include:

Table Keep records newer than n days/Filters Notes
OBMOBC_LogClient
  • 30 days for warn and error messages
  • 15 days for the rest
Keeps track of logs client logs generated in WebPOS

It also schedules a process to execute this clean up. It is scheduled to be run every Sunday at 0:00 (server local time).

Modifying default configuration

Warn-icon.png   In case Logs Clean Up Module was already installed previously to PR15Q2, default configuration will be added to any existent one. In this case, please follow the instructions below to keep the one that makes sense.
Bulbgraph.png   All changes in the configuration should be done without deleting any existing preconfigured record, not in Log Clean Up Configuration window, nor the scheduled process. But by disabling them. Other case, future updates will recover these settings
.

Configuration

After installing Log Clean Up Utility module, it requires to configure two things:

Entities

The entities to be processed are configured, as System Administrator role, from Log Clean Up Configuration window.

CleanUpConfig.png

The fields in this window are:

Warn-icon.png   When creating the configuration it must ensured that Log Table is actually a table used for logging and not for any other purpose, as the process will remove records from it irrecoverably.

Typical Log Tables

This is a list of the most common log tables included within Openbravo distribution (note other modules can add new ones).

Process

It is also required to schedule the Log Clean Up Process which is in charge of doing the clean up based on the configuration explained above.

To schedule it, create a new entry for Log Clean Up Process in Process_Request window. The best scheduling for this request might vary depending on how often the different entities are configured to be cleaned up. In any case, it is strongly advisable to set it up to be executed when Openbravo is not under an intensive usage (for example during the weekend) because this process can be highly demanding in database resources depending on the amount of information it requires to remove.

Data Level

Level of data to be removed depends on the Client and Organization the Process Request is defined in.

-In case the Request is at System level (client is System), all rows matching the criteria will be deleted regardless their Client/Organization. -In case the Request is at any other Client and/or Organization, records to be deleted will be filtered by that Client. Organization will be filtered by the ones below in the hierarchy to the selected one.

Entity Specific Implementations

Bulbgraph.png   This section is intended for developers.

It is possible to define specific actions to be executed when deleting data in an entity.

This can be achieved by extending org.openbravo.utility.cleanup.log.CleanEntity class having a Qualifier with the desired Entity Name. In this situation, clean will be invoked, being possible to overwrite it with the specific actions.

Retrieved from "http://wiki.openbravo.com/wiki/Logs_Clean_Up"

This page has been accessed 12,421 times. This page was last modified on 18 February 2015, at 12:31. Content is available under Creative Commons Attribution-ShareAlike 2.5 Spain License.