Audit log settings

Updated at:

You can synchronize audit logs to a specified data source at regular intervals for easy retrieval.

Prerequisites

A data source for storing audit logs must already exist in the metadata warehouse tenant. Supported types: MySQL, Oracle, PostgreSQL, Microsoft SQL Server, and DM. For more information, see .

Permission description

Only the super administrator and system administrator of the metadata warehouse tenant can configure audit log settings.

Audit log configuration

Important
  • Changing the data source or data table updates all existing synchronization tasks.

  • Disabling scheduled synchronization pauses audit log retrieval. Re-enabling it resumes the process.

  • Synchronization tasks run on a T+1 basis and automatically backfill data at the configured incremental synchronization frequency.

  1. Sign in to Dataphin with a super administrator or system administrator account associated with the metadata warehouse tenant.

  2. Navigate to Management Center > System Settings from the top menu bar on the Dataphin home page.

  3. In the navigation pane on the left, click Audit Log Settings to access the Audit Log Settings page and set the parameters.

    Parameter

    Description

    Scheduled Synchronization Of Audit Logs

    Audit logs record user operations in Dataphin, including those performed through the interface and OpenAPI. Enable this feature to configure the Storage Data Source, Storage Table, and Incremental Synchronization Frequency.

    Storage Data Source

    Filter data sources by type. Supported types: MySQL, Oracle, PostgreSQL, Microsoft SQL Server, and DM.

    If the required data source is not listed, click Create Now to open the data source creation dialog in Management Center > Data Source Management.

    Note
    • Ensure the data source is configured with the correct encoding to query audit logs over JDBC. For encoding configuration details, see .

    • Only one audit log synchronization task is allowed per data source. However, separate tasks can be set for different environments (development and production) of the same data source.

    • The data source must be accessible from the default cluster. For more details, see .

    Storage Table

    Select a data table from the data source that meets the DDL requirements for log storage. Use Create Table With One Click to quickly generate a compliant table.

    Note

    For Microsoft SQL Server data sources, one-click table creation is not supported. Copy the table creation statement and run it in the database.

    --Dataphin will execute the following statement to create the log storage table. Modifying the table creation statement is not supported. For the specific meanings of the fields, see the description in the "References" section below.
      CREATE TABLE `dataphin_action_log_storage` (
          `date` VARCHAR(64),
          `time` VARCHAR(64),
          `old_trace` VARCHAR(255),
          `app_name` VARCHAR(255),
          `audit` VARCHAR(255),
          `unuseful` VARCHAR(255),
          `trace_id` VARCHAR(255),
          `span_id` VARCHAR(255),
          `event_id` VARCHAR(255),
          `event_name` VARCHAR(255),
          `event_version` VARCHAR(50),
          `event_type` VARCHAR(100),
          `event_source` VARCHAR(255),
          `user_identity` VARCHAR(255),
          `source_ip` VARCHAR(45),
          `user_agent` VARCHAR(255),
          `request_parameter` TEXT,
          `response_element` TEXT,
          `event_status` VARCHAR(8),
          `resource_id` VARCHAR(255),
          `resource_name` VARCHAR(255),
          `resource_type` VARCHAR(255),
          `additional_event_data` JSON,
          `region` VARCHAR(100),
          `log_time` VARCHAR(255),
          `tenant_id` VARCHAR(64),
          `request_parameter_json` TEXT,
          `user_identity_json` TEXT,
          `raw_log` TEXT
      ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

    Incremental Synchronization Frequency

    The synchronization frequency for audit logs. Options: Synchronization At Midnight Every Day, Synchronization At The Top Of Every Hour, and Synchronization At The Top And Bottom Of Every Hour.

    Synchronization Task

    After completing the configuration, click Confirm to create the synchronization task. You can then click Go To View or Go To Configure Alerts.

    • Go To View: Opens the script task list in Operation Center > Auto triggered node, filtered to show the synchronization task.

    • Go To Configure Alerts: Opens the offline task monitoring dialog in Operation Center > Auto triggered node, where you can set alerts for the task.

  4. To finalize the audit log configuration, click Confirm.

References

For details about audit log fields and log events across Dataphin modules, see Audit logs.