Querying Database Error Logs
Description
This API is used to query database error logs.
Restrictions
A maximum of 2000 records can be queried within the period specified by start_date and end_date.
URI
- URI format
GET https://{Endpoint}/v3/{project_id}/instances/{instance_id}/errorlog?start_date={start_date}&end_date={end_date}
- URI example
- Querying database error logs
https://dds.ap-southeast-1.myhuaweicloud.com/v3/0483b6b16e954cb88930a360d2c4e663/instances/6ade8143870047b8999aba8f1891b48ein02/errorlog?start_date=2018-08-06T10:41:14+0800&end_date=2018-08-07T10:41:14+0800
- Querying database error logs based on specified conditions.
https://dds.ap-southeast-1.myhuaweicloud.com/v3/0549b4a43100d4f32f51c01c2fe4acdb/instances/6ade8143870047b8999aba8f1891b48ein02/errorlog?type=WARNING&offset=1&limit=20&node_id=a7c84462483642798cf159237343135fno06&start_date=2018-08-06T10:41:14+0800&end_date=2018-08-07T10:41:14+0800
- Querying database error logs
Name |
Type |
Mandatory |
Description |
---|---|---|---|
x-auth-token |
String |
Yes |
User token |
Content-Type |
String |
Yes |
MIME type of the request body. You are advised to use the default value application/json. For APIs used to upload objects or images, the value can vary depending on the flow type. |
project_id |
String |
Yes |
The project ID of a tenant in a region. To obtain the project ID, see Obtaining a Project ID. |
instance_id |
String |
Yes |
The instance ID, which can be obtained by calling the API for querying instances. If you do not have an instance, you can call the API used for creating an instance. |
start_date |
String |
Yes |
The start time in the "yyyy-mm-ddThh:mm:ssZ" format. T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset.
CAUTION:
The start time is 31 days earlier than the current time. |
end_date |
String |
Yes |
The end time in the "yyyy-mm-ddThh:mm:ssZ" format.
NOTE:
The end time cannot be later than the current time. |
node_id |
String |
No |
The node ID. For details, see Table 8. If this parameter is left blank, all nodes in the instance can be queried. Nodes that can be queried:
|
type |
String |
No |
The statement type. If it is left blank, all statement types are queried. Valid value:
|
offset |
Integer |
No |
The index position. Its value range is [0, 1999]. If offset is set to N, the resource query starts from the N+1 piece of data. The value is 0 by default, indicating that the query starts from the first piece of data. The value cannot be a negative number. |
limit |
Integer |
No |
The number of resources to be queried. The value ranges from 1 to 100. The default value is 10, indicating that 10 records are returned by default.
NOTE:
The sum of limit and offset values must be less than or equal to 2000. |
Requests
None
Responses
- Parameter description
Table 2 Parameter description Name
Type
Description
error_log_list
Array of objects
The detailed information.
For details, see Table 3.
total_record
Integer
The total number of records.
- Response example
{ "error_log_list": [ { "node_name": "Test_replica_node_2", "level": "WARNING", "time": "2020-12-15T08:53:01.868+0000", "content": "W NETWORK [LogicalSessionCacheReap] Unable to reach primary for set replica" } ], "total_record": 1 }
Status Code
For more information, see Status Code.
Error Code
For more information, see Error Code.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.