Enabling audit logging for Teracloud® Streams

To enable audit logging for Teracloud® Streams, use this procedure to create a log4j configuration file and update the required domain properties.

About this task

Procedure

  1. Create a log4j configuration file for audit logging.
    1. Make a copy of the following sample file that is installed with Teracloud® Streams:
      product-installation-root-directory/7.2.0.0/etc/trc/log.default.properties.xml
    2. Edit the copy as needed.
    Important: Do not edit the sample .xml file. If you edit the sample .xml file and it becomes corrupted, errors can occur.

  2. Optional: Customize audit logging by adding filters to your log4j configuration file.

  3. Optional: Change the default location of the audit log files in your log4j configuration file.

    By default, Teracloud® Streams saves the audit log files in the same location as the other product log files, which is the directory that is specified on the domainLog.path property. To save the audit log files in a different location, change the streams_log_path variable in your log4j configuration file to another path on your system.

  4. Set the auditlog.log4jPropertiesFile domain property to point to your log4j configuration file.
    The log4j configuration file must be accessible in the path that is specified by the auditlog.log4jPropertiesFile property by all resources that run the audit log service. This can be a shared file location or an exact copy on each resource.
  5. Optional: Set the auditlog.log4jAppenderClassPath domain property. This property is used to find the customized log4j appender ClassPath.
  6. Set the auditlog.level domain property to standard.
    The default setting is off.
  7. If the domain is running, you must restart the domain for the changes to be effective.

Results

After the changes become effective for the domain, users can dynamically enable or disable audit logging by updating the auditlog.level domain property. Possible settings are off (no auditing) or standard (auditing performed at the standard level).
Note: For more information about the audit logging properties, enter streamtool man domainproperties. All properties that apply to audit logging are prefixed with auditlog. To set properties, use the streamtool setdomainproperty command.