Viewing and Downloading Error Logs
Scenarios
Error logs contain logs generated while the database is running. These can help you analyze problems with the database. You can also download error logs for service 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 on the left, choose Logs. On the Error Logs page, click Log Details to view details about error logs. Figure 1 Error log details
Table 1 Error log details Parameter
Description
Time
UTC time when a log was generated
Log Level or SQL Statement
- You can select a log level in the upper right corner to view logs of the selected level.
- All log levels
- ERROR
- FATAL
- PANIC
- You can view executed SQL statements.
- You can also click
in the upper right corner to select a time range and view error logs for different periods. You can view error logs from up to the last 30 days.
Description
- Up to 2,000 error log entries can be queried.
- For descriptions that cannot be fully displayed, hover your mouse over them to view full 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 to go to the Summary page.
- 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
- It is recommended that a single log file to be downloaded contain no more than 10,000 lines and be no larger than 10 MB. Otherwise, the log content will be truncated.
- Downloaded logs come only from the primary instance. Downloaded logs contain both error and run logs.
- 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.
- Only the latest log file of 40 MB to 100 MB can be downloaded.
- The download link is valid for 5 minutes. If the link expires, a message prompts you to download the log again. Click OK to download the file again, or Cancel to cancel the operation.
Configuring Error Log Ingestion to LTS and Showing the Analysis View
In certain regions, to use this function, you need to submit a service ticket to obtain required permissions.
- 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 3 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 4 List view
Figure 5 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: POSTGRESQL.
node_type
Username, for example, root.
severity
Error log level or SQL statement (value: STATEMENT). Log levels include ERROR, FATAL, and PANIC.
raw_message
Error log description.
log_time
UTC time when a log 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