11 Defining Housekeeping Rules

Housekeeping tasks help you to remove old and unwanted event log data, produced by the running of EDQ jobs in a certain time interval. You can schedule these tasks to run regularly to perform the required functions.

This chapter describes how to define housekeeping rules:

11.1 For the Event Log Table

When event log data uses a large amount of tablespace, for example when jobs are run very regularly on a schedule, you can define housekeeping rules for handling the situation.

You can activate this functionality on the server by adding an xml file named eventlog.xml to the housekeeping subfolder of the EDQ local home directory .

Note:

The housekeeping subfolder is not available in the EDQ local home directory by default. So you need to create one, to configure this functionality.
The interval units and parameter options together define the time older than which events are deleted when the purger runs. The interval units (denoted in days, hours, minutes or seconds) represent the time interval to check, and the parameter value specifies the measurement older than which events can be deleted.

For example - The below rule runs an event log purging housekeeping task every morning at 2 am (server time) and deletes all events log older than 10 days.

. 
<housekeeping> 
. 
  <task name="eventpurger"> 
    <start>02:00:00</start> 
    <interval units="hours">24</interval>       
    <parameter>10</parameter> 
  </task> 
. 

11.2 For the Task Status Table

When task status data uses a large amount of tablespace, for example when jobs are run regularly on a schedule, you can define housekeeping rules for handling the situation.

You can activate this functionality on the server by adding an xml file named taskstatus.xml to the housekeeping subfolder of the EDQ local home directory. The task name for the task status housekeeping should be taskstatusdao.

Note:

The housekeeping subfolder is not available in the EDQ local home directory by default. So you need to create one, to configure this functionality.

The interval units and parameter options together define the time older than which task statuses are deleted when the purger runs. The interval units (denoted in days, hours, minutes or seconds) represent the time interval to check, and the parameter value specifies the measurement older than which task statuses can be deleted.

For example - The below rule runs an task status purging housekeeping task every morning at 2.30 am (server time) and deletes all task statuses older than 100 days.

<housekeeping>

  <task name="taskstatusdao">
    <start>02:30:00</start>
    <interval units="hours">24</interval>      
    <parameter>100</parameter>
  </task>

</housekeeping> 

Note:

You need not restart the server after changing the housekeeping rules, for the changes to take effect.