Help Center/ GaussDB/ User Guide/ Logs and Auditing/ Interconnecting with LTS and Querying Database Audit Logs
Updated on 2024-10-08 GMT+08:00

Interconnecting with LTS and Querying Database Audit Logs

Scenarios

Log Tank Service (LTS) collects, analyzes, and stores logs. If you enable Upload Audit Logs to LTS, GaussDB audit logs will be uploaded to LTS and you can search for logs, monitor logs, download logs, and view real-time logs.

Precautions

  • LTS is a whitelist feature. To use this function, submit an application by choosing Service Tickets > Create Service Ticket in the upper right corner of the management console.
  • Currently, this function is available only for primary/standby instances of version 2.1.0 or later.
  • Audit logs record all requests sent to your DB instance and are stored in LTS.
  • Toggling on or off this function will not be applied immediately. There is a delay of about 10 minutes.
  • For details about how to enable or disable the audit log function, configure audit_enabled.
  • For details about the parameters for controlling audit logs, see Audit Items.
  • You will be billed for this function. For details, see LTS Pricing Details.
  • After this function is enabled, audit policies you configured are reported to LTS by default.

Enabling Upload Audit Logs to LTS

  1. Log in to the management console.
  2. Click in the upper left corner and select a region and project.
  3. Click in the upper left corner of the page and choose Databases > GaussDB.
  4. In the navigation pane on the left, click Instances.
  5. Click the instance name to go to the Basic Information page.
  6. In the navigation pane on the left, click Audit Logs.
  7. Click next to Upload Audit Logs to LTS.
  8. In the displayed dialog box, configure Log Group and Log Stream.

    Figure 1 Enabling Upload Audit Logs to LTS

    If you enable this function for the first time, click View Log Groups to log in to the LTS console and configure log groups and log streams. For details, see Managing Log Groups and Managing Log Streams.

  9. Click OK.

    After this function is enabled, audit logs will not be uploaded immediately to LTS. There is a delay of about 10 minutes. For details, see Viewing Real-Time Logs.

Disabling Upload Audit Logs to LTS

  1. Log in to the management console.
  2. Click in the upper left corner and select a region and project.
  3. Click in the upper left corner of the page and choose Databases > GaussDB.
  4. In the navigation pane on the left, click Instances.
  5. Click the instance name to go to the Basic Information page.
  6. In the navigation pane on the left, click Audit Logs.
  7. Click next to Upload Audit Logs to LTS.
  8. In the displayed dialog box, confirm the information.

    Figure 2 Disabling Upload Audit Logs to LTS

  9. In the displayed dialog box, click OK.