Version 9.6
 —  Logging  —

Configuring Logs

CentraSite uses the system-defined log settings to store activities and performances of some of the registry objects, such as policies and assets, as log records. However, in some cases, you might want to modify the log settings configuration, in order to determine the optimal performance for 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 settings configuration. The log settings configuration applies to each log record.

The command line tool is CentraSiteCommand.cmd (on Windows) or CentraSiteCommand.sh (on UNIX/Linux), and is located in <CentraSiteInstallDir>/utilities.

Prerequisites

To be able to configure the log settings, please note the following points:


Configuring Log Settings from the Command Line

You can configure log settings 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 setting from the command line, you must perform the following high-level steps:

  1. Create a configuration (config.xml) file as described in Creating a Configuration File to Define Log Setting.

  2. Execute the script file with appropriate input parameters as described in Executing the Script File that Invokes Log Setting.

Important:
You must be a user with CentraSite Administrator role to execute the script file.

Creating a Configuration File to Define Log Setting

This section will describe how to create a config.xml file that defines a log setting. Examine the config.xml file. It contains at least the XML namespace used for providing uniquely named elements and attributes.

Define a Log Unit

The unique element LogUnit represents the com.centrasite.config.log.unit property in config,xml. The LogUnit element specifies the log record to be stored in the CentraSite Log Database.

In the LogUnit element, add an attribute called name and assign it a value equal to either of the following:

Log Unit Description
Policy_Log Contains information about the design/change-time policies that CentraSite has executed.
Approval_Log Contains information about all approval requests that has been triggered by a policy with an approval workflow action.
Audit_Log Contains information on the creation/update activities of a particular asset (including changes in an asset's lifecycle state).
Runtime_Event_Log 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 Contains information about the KPI metrics of all rogue assets.

This LogUnit element should look similar to this:

<LogUnit name="Policy_Log"> 
    </LogUnit> 

Define Log Settings

The com.centrasite.config.log.setting property represents the LogSetting attribute. This attribute defines specific information about the performance of the registry object.

In this section, you create log settings that will be used within the log unit definition.

Within the LogUnit element, create LogSetting attributes say, Success, Failure etc.

You can configure the LogUnit element with one of the appropriate LogSetting attributes.

Log Unit Description
Policy Log
Log Setting
Logs
Success Policies that have resulted in success alert.
Info Policies that have resulted in informational alert.
Warning Policies that have resulted in warning alert
Failure Policies that have resulted in failure alert.

For more information, see The Policy Log.

Approval Log
Log Setting
Logs
Approval and Rejection Approval policies that have resulted both in Approved and Rejected state.
Rejection only Approval policies that have resulted in Rejected state.

For more information, see The Approval History Log.

Audit Log
Log Setting
Logs
Enable Audit All activities (such as creation, modified etc) performed on a particular asset.

For more information, see Audit Logs.

Run-Time Event Log
Log Setting
Logs
Policy Violation Events Monitors and tracks all the policy violation events.
Transaction Events Monitors and tracks all the transaction events.
Monitoring Events Monitors and tracks all the monitoring events.
Lifecycle Events Monitors and tracks all the lifecycle events.

For more information, see Run-Time Event Logs.

Run-Time Performance Log
Log Setting
Logs
Log Performance Events Monitors and tracks all the performance events

For more information, see Run-Time Performance Logs.

This LogSetting attribute should look similar to this:

LogUnit name="Policy_Log"> 
        <LogSetting>Success</LogSetting>
        <LogSetting>Failure</LogSetting>  
    </LogUnit> 

The final config.xml should look similar to this:

<LogSettings xmlns="http://namespaces.centrasite.com/configurations/logs"> 
    <LogUnit name="Policy_Log"> 
        <LogSetting>Success</LogSetting> 
    </LogUnit> 
    <LogUnit name="Approval_Log"> 
        <LogSetting>Approval_and_Rejection</LogSetting> 
    </LogUnit> 
    <LogUnit name="Audit_Log"> 
        <LogSetting>Enable_Audit</LogSetting> 
    </LogUnit> 
   <LogUnit name="Runtime_Event_Log"> 
        <LogSetting>Transaction_Events</LogSetting> 
        <LogSetting>Policy_Violation_Events</LogSetting> 
        <LogSetting>Monitoring_Events</LogSetting> 
        <LogSetting>Lifecycle_Events</LogSetting> 
   </LogUnit> 
   <LogUnit name="Runtime_Performance_Log"> 
        <LogSetting>Log_Performance_Events</LogSetting> 
   </LogUnit> 
</LogSettings>

Note:
Make sure you copy this file somewhere within the file system of the machine where CentraSite is installed.

Executing the Script File that Invokes Log Setting

To invoke log setting, you must use the command line utility CentraSiteCommand with the config.xml input parameter, as follows:.

CentraSiteCommand set Log [-url <CENTRASITE-URL>] -user <USER-ID> -password
<PASSWORD> -file <CONFIG-FILE>

Example

CentraSiteCommand set Log -url "http://localhost:53307/CentraSite/CentraSite" -user "Administrator" -password
"manage" -file "config.xml"

Input Parameters

The following table describes the complete set of input parameters that you can use with the set Log 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".
-file
The URI (file: or http:) of the configuration file.

Top of page