For performance reasons, CentraSite uses system log records to store activities and performances of some of the registry objects (say, policies, assets etc.) that are defined via the log settings. However, in some cases, you might want to modify the log settings configuration, in order to avoid performance degradation of CentraSite. This section describes some of the methods that you can use for such purposes.
These methods allow you to display and modify the log purging configuration. The log purging configuration applies to each log record.
To be able to configure the log purging, please note the following points:
To configure from a command line, the CentraSite Registry Repository must be online, and the tool requires a Java 6 runtime.
Changes to the log purging configuration do not affect the currently running tasks.
Note that CentraSite does not purge:
Policy logs in "InProgress" state.
Auditable events that log on object creation.
Approval logs in "Pending" state.
Federation job queue data.
Consumer registration data.
Purged audit log data (that is, records of the audit logs that were purged earlier).
Note:
When you purge policy log entries, CentraSite creates
a new informational policy log entry indicating that policy log entries have
been purged. If any such informational policy log entries exist from previous
invocations of the policy log purger, they are also purged, so that the only
such policy log entry remaining is the one for the current
invocation.
You can configure log purging by executing the following command in the command line interface CentraSiteCommand.cmd (Windows) or CentraSiteCommand.sh (UNIX) of Command Central. The tool is located in <CentraSiteInstallDir>/utilities.
If you start this command line tool with no parameters, you receive a help text summarizing the required input parameters.
The parameters of the command are case-sensitive, so for example the parameter "-url" must be specified as shown and not as "-URL".
To invoke log purging from the command line, you must perform the following high-level steps:
Create a configuration (config.xml) file as described in Creating a Configuration File to Define Log Purging.
Execute the script file CentraSiteCommand with appropriate input parameters as described in Executing the Script File that Invokes Log Purging.
Important:
You must be a user with CentraSite Administrator role to
execute the script file.
This section describes how to create a config.xml file that defines a log purging. Examine the config,xml file. It contains at least the XML namespace used for providing uniquely named elements and attributes.
The LogPurgeSetting
element specifies the type of log
record to be purged from the CentraSite Log Database.
In the LogPurgeSetting
element, add an attribute called
log
and assign it a value equal to either of the following:
Log Unit | Description |
---|---|
Policy_Log
|
Purge log record that contains information about the design/change-time policies that CentraSite has executed. |
Approval_Log
|
Purge log record that contains information about all approval requests that has been triggered by a policy with an approval workflow action. |
Audit_Log
|
Purge log record that contains information on the creation/update activities of a particular asset (including changes in an asset's lifecycle state). |
Runtime_Event_Log
|
Purge log record that contains information about run-time events that have occurred in a target (i.e., a policy-enforcement point (PEP) or a run-time monitoring component). |
Runtime_Performance_Log |
Purge log record that contains information about the KPI metrics of all rogue assets. |
This LogPurgeSetting element should look similar to this:
<LogPurgeSetting log="Runtime_Event_Log"> </LogPurgeSetting> <LogPurgeSetting log="Runtime_Performance_Log"> </LogPurgeSetting>
The log purge type attributes provide information about the different type of logs configured to be purged on different days, times and even how many days of logs to keep.
In this section, you create the purge type attributes that will be used by the log purge setting definition.
Within the LogPurgeSetting
element, create the following
attributes (as required) and assign values.
Log Purge Setting | Description |
---|---|
ExportLocation
|
Specifies a location for the exported files on the database. If an export location is not specified, then CentraSite simply deletes the log records. |
Until
|
Deletes log records and exports them as an archive to a configurable directory that can be imported later. Note: |
OlderThan
|
Deletes log records that are older than the specified date and exports them as an archive to a configurable directory that can be imported later. Note: |
CommitThreshold |
Defines the threshold value for batch purging each of the log units. The default threshold value is "10000". |
Note:
If both Until
and OlderThan
properties are not specified in the configuration file, the date is assumed to be current date.
The LogPurgeSetting element should now look similar to this:
<LogPurgeSetting log="Runtime_Event_Log"> <OlderThan>-P5D</OlderThan> </LogPurgeSetting> <LogPurgeSetting log="Runtime_Performance_Log"> <Until>2002-05-30</Until> <CommitThreshold>1000</CommitThreshold> </LogPurgeSetting>
The final config.xml should look similar to this:
<LogPurgeSettings xmlns="http://namespaces.centrasite.com/configurations/logs"> <LogPurgeSetting log="Approval_Log"> <ExportLocation>/home/usr/admin/centrasite/log/backups/approval</ExportLocation> </LogPurgeSetting> <LogPurgeSetting log="Runtime_Event_Log"> <OlderThan>-P5D</OlderThan> </LogPurgeSetting> <LogPurgeSetting log="Runtime_Performance_Log"> <Until>2002-05-30</Until> <CommitThreshold>1000</CommitThreshold> </LogPurgeSetting> </LogPurgeSettings>
Note:
Make sure you copy this file somewhere within the file system of
the machine where CentraSite is installed.
To invoke log purging function, you must use the script file CentraSiteCommand with the config.xml input parameter, as follows:
CentraSiteCommand purge Logs [-url <CENTRASITE-URL>] -user <USER-ID> -password <PASSWORD> [-assets <Asset Name/Key (s)>] -file <CONFIG-FILE>
CentraSiteCommand purge Logs -url "http://localhost:53307/CentraSite/CentraSite" -user "Administrator" -password "manage" -assets "MyService" -file "config.xml"
The following table describes the complete set of input parameters that
you can use with the purge Logs
utility:
Parameter | Description |
---|---|
-url |
The fully qualified URL (http://localhost:53307/CentraSite/CentraSite) for the CentraSite registry/repository. |
-user |
The user ID of a user who has the "CentraSite Administrator" role. |
-password |
The password of the user identified by the parameter "-user". |
-assets |
The name or UUID assigned to the asset and which uniquely identifies it within the registry. |
-file |
The URI (file: or http:) of the configuration file. |
Note:
If the specified key or name of the asset to purge does not match
any existing asset in the registry, then no purging is done.