Querying Database Error Logs
Function
This API is used to query error logs of an instance. Searching for error logs by keyword is not supported.
Constraints
This API supports GeminiDB Mongo instances.
The latest 2,000 error logs can be queried.
The past one month of error logs can be queried.
Authorization Information
Each account has permissions to call all APIs, but IAM users must have the required permissions specifically assigned.
- If you are using role/policy-based authorization, see the required permissions in Permissions and Supported Actions.
- If you are using identity policy-based authorization, the following identity policy-based permissions are required.
Action
Access Level
Resource Type (*: required)
Condition Key
Alias
Dependencies
gaussdbfornosql:instance:listErrorLog
List
instance *
- g:ResourceTag/<tag-key>
- g:EnterpriseProjectId
nosql:instance:list
-
URI
GET /v3/{project_id}/instances/{instance_id}/error-log
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Project ID of a tenant in a region. To obtain this value, see Obtaining a Project ID. |
|
instance_id |
Yes |
String |
Instance ID, which can be obtained by calling the API described in Querying Instances and Details. If there are no instances available, call the API described in Creating an Instance to create one. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
start_time |
Yes |
String |
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. The start time is at most 30 days earlier than the current time. |
|
end_time |
Yes |
String |
End 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. Only error logs generated in the past month can be queried. The end time cannot be later than the current time. |
|
node_id |
No |
String |
Node ID. If this parameter is left blank, all nodes in the instance can be queried. |
|
type |
No |
String |
Statement type. If this parameter is left empty, all statement types are queried. The following log types are supported:
|
|
offset |
No |
Integer |
Index offset.
|
|
limit |
No |
Integer |
Number of records to be queried.
|
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
User token |
Response Parameters
Status code: 202
|
Parameter |
Type |
Description |
|---|---|---|
|
total_count |
Integer |
Total number of records. |
|
error_log_list |
Array of Table 5 objects |
Error log information. |
Example Requests
Example Responses
Status code: 202
Successful response
{
"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_count" : 1
}
Status Codes
For details, see Status Codes.
Error Codes
For details, see Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank 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