Help Center/ GaussDB(for MySQL)/ User Guide/ Logs and Auditing/ Managing Error Logs of a DB Instance
Updated on 2024-11-06 GMT+08:00

Managing Error Logs of a DB Instance

Error logs contain logs generated while the database is running. They can help you analyze problems with the database.

Viewing Log Details

  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(for MySQL).
  4. On the Instances page, click the instance name.
  5. In the navigation pane, choose Logs.
  6. On the Error Logs page, view error logs of different nodes, at different log levels, and within a specified time range.

    Click the drop-down list in the upper right corner, and select a node name and a log level as needed.

    The levels of error logs include ALL, INFO, WARNING, ERROR, FATAL and NOTE.

    Click and specify a time period.

    Figure 1 Viewing error logs

Downloading an Error Log

  1. On the Instances page, click the instance name.
  2. In the navigation pane, choose Logs.
  3. On the Error Logs tab, click Download. Locate a log whose status is Preparation completed and click Download in the Operation column.

    Figure 2 Downloading an error log

    • The system automatically loads the download preparation tasks. The loading duration is determined by the log file size and network environment.
      • When the log is being prepared for download, the log status is Preparing.
      • When the log is ready for download, the log status is Preparation completed.
      • If the preparation for download fails, the log status is Abnormal.

      Logs in the Preparing or Abnormal state cannot be downloaded.

    • Only logs no more than 40 MB can be downloaded directly from this page. The time range is calculated from the time you download the logs back to the time when the accumulated file size reaches 40 MB.
    • The download link is valid for 5 minutes. After the download link expires, a message is displayed indicating that the download link has expired. If you need to download the log, click OK.
    • You can select the logs to be downloaded by node.

Reporting Error 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, choose Databases > GaussDB(for MySQL).
  4. On the Instances page, click the instance name.
  5. In the navigation pane, choose Logs.
  6. On the Error Logs tab, click next to Report Error Logs to LTS.
  7. Select an LTS log group and log stream and click OK.

    Figure 3 Reporting error logs to LTS