Managing Error Logs
Scenarios
RDS log management allows you to view database-level logs, including error logs and slow SQL query logs.
Error logs help you analyze problems with databases. You can download error logs for further analysis.
Viewing and Downloading Error Logs
- Log in to the RDS console.
- Click
in the upper left corner and select a region. - On the Instances page, click the target instance name to go to the Summary page.
- In the navigation pane, choose Logs.
- On the Error Logs tab page, click the Log Details tab. You can view error logs by node, level, and specific time range. Figure 1 Error log details
Table 1 Error log details Parameter
Description
Time
UTC time when a log was generated
Log Level
- You can select a log level in the upper right corner to view logs of the selected level.
- All log levels
- ERROR
- WARNING
- NOTE
- You can also click
in the upper right corner to select a time range and view error logs for different periods. Only error logs generated within the last month can be viewed.
Description
- A maximum of 2,000 error log records can be displayed. To view more error log records, submit a service ticket.
- If the description of a log is truncated, locate the log and move your pointer over the description in the Description column to view details.
- You can select a log level in the upper right corner to view logs of the selected level.
- Log in to the RDS console.
- Click
in the upper left corner and select a region. - On the Instances page, click the target instance name.
- In the navigation pane on the left, choose Logs. On the Error Logs page, click the Downloads tab. In the log list, locate a log file whose status is Preparation completed and click Download in the Operation column. Figure 2 Downloading an error log
- The system automatically loads the downloading 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 status cannot be downloaded.
- 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 redownload the log, click OK.
- The downloaded logs contain only the logs of the primary node.
- If the size of a log to be downloaded is greater than 40 MB, you need to use OBS Browser+ to download it.
- Download OBS Browser+.
- Decompress and install OBS Browser+. Figure 3 Logging in to OBS Browser+
- On the OBS Browser+ download page of any backup, obtain the name of an external bucket. For details, see Method 1: Using OBS Browser+. Figure 4 Obtaining an external bucket name
- Add an external bucket. Figure 5 Adding an external bucket
If you want to access OBS external buckets across accounts, the access permission is required. For details, see Granting IAM Users Under an Account the Access to a Bucket and Resources in the Bucket.
- Click the name of the external bucket to go to the object list page. In the search box on the right, enter the log file name and start a search. In the search result, click
to download the log file. Figure 6 Downloading a log file
- The system automatically loads the downloading preparation tasks. The loading duration is determined by the log file size and network environment.
Configuring Error Log Ingestion to LTS and Showing the Analysis View
- Log in to the RDS console.
- Click
in the upper left corner and select a region. - On the Instances page, click the target instance name to go to the Summary page.
- In the navigation pane, choose Logs.
- On the Error Logs tab page, click Ingest Logs to LTS in the upper right corner.
- In the displayed dialog box, select Ingest Logs to LTS, select Error logs under Log Types, select a log group and log stream, and click OK. Figure 7 Configuring error log ingestion to LTS
- If error log ingestion to LTS is enabled, you can switch to the analysis view in the upper right corner of the page to see more details. Figure 8 List view
Figure 9 Analysis view
- On the Log Search tab page, you can view structured fields and index configuration fields under Quick Analysis as well as view and download log contents. For more information, see Searching and Analyzing Logs.
For explanations of the fields on the Raw Logs page in the analysis view, see Table 2.
Table 2 LTS error log fields Parameter
Description
log_type
Log type. Fixed value: error_log.
instance_id
Instance ID.
node_id
Node ID within an instance.
_resource_id
Resource ID. Fixed value: DBS_LOG. Ignore this parameter.
_resource_name
Resource name. Fixed value: DBS_LOG. Ignore this parameter.
_service_type
Service type. Fixed value: DBS.
service_name
Service name. Fixed value: MYSQL.
severity
Error log level. Values: ERROR, WARNING, and NOTE.
raw_message
Error log description.
log_time
UTC timestamp when the log entry was generated.
project_id
Project ID. You can view it by hovering over the username in the upper right corner and choosing My Credentials from the drop-down list.
- On the Charts tab page, you can view scenario-specific data in multiple chart types, including tables, bar charts, and line charts. For more information, see Statistical Charts.
- On the Log Analysis tab page, you can search for and analyze collected log data. For more information, see Log Search and Analysis.
- On the Real-Time Logs tab page, you can view logs reported in real time to quickly search for and analyze log data. For more information, see Viewing Real-Time Logs.
- On the Log Search tab page, you can view structured fields and index configuration fields under Quick Analysis as well as view and download log contents. For more information, see Searching and Analyzing Logs.
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot