How to purge CA Workload Automation (DE) audit files?

Document ID : KB000050445
Last Modified Date : 14/02/2018
Show Technical Document Details

Description:

CA Workload Automation (DE) audit files do not get purged or removed from the server. They have to be manually removed from the server.

Solution:

Here is a UNIX script that can be used to clear out auditlogs.
Copy and save this text as clear_auditlog.sh

   #! /bin/ksh   
    -n "$1"  || { echo "Usage: clear_auditlog.sh 10"; return ; }   
   ##   
   #Change CAWA_PATH to match your server install path   
   ##   
   CAWA_PATH=/opt/CA/WorkloadAutomation   
   FILE=$CAWA_PATH/LogFiles/auditlog*   
   find $FILE -type f -mtime +$1 -exec rm {} \;   
   #--EOF--  

Before using the script, change the CAWA_PATH to match the path of your server installation. The script will require a command line argument to pass which relates to the age of the auditlogs.

E.g.: "./clear_auditlog.sh 10" would clear auditlogs that are older than 10 days.

It is highly recommend that clients DO NOT clear out the auditlogs, but instead move them somewhere else. Moving auditlogs to some other location will allow clients to have all of their auditlogs information in case of an audit.