Reviewed-by: Kacur, Michal <michal.kacur@t-systems.com> Co-authored-by: Zheng, Xiu <zhengxiu@huawei.com> Co-committed-by: Zheng, Xiu <zhengxiu@huawei.com>
13 KiB
Searching for Logs
Function
This API is used to query log information.
URI
POST /v1.0/{project_id}/clusters/{cluster_id}/logs/search
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
project_id |
Yes |
String |
Project ID. For details, see Obtaining a Project ID and Name. |
cluster_id |
Yes |
String |
ID of the cluster you want to query. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
instanceName |
Yes |
String |
Node name. |
level |
Yes |
String |
Log level. The levels of logs that can be queried are INFO, ERROR, DEBUG, and WARN. |
logType |
Yes |
String |
Log type. The types of logs that can be queried are deprecation, indexingSlow, searchSlow, and instance. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
|---|---|---|
logList |
Array of logList objects |
Log list. |
Example Requests
{
"instanceName" : "css-4312-ess-esn-1-1",
"level" : "INFO",
"logType" : "instance"
}
Example Responses
Status code: 200
Request succeeded.
{
"logList" : [ {
"content" : "xxxxxx",
"date" : "2021-10-08T03:55:54,718",
"level" : "INFO"
} ]
}
Status Codes
Status Code |
Description |
|---|---|
200 |
Request succeeded. |
400 |
Invalid request. Modify the request before retry. |
409 |
The request could not be completed due to a conflict with the current state of the resource. The resource that the client attempts to create already exists, or the update request fails to be processed because of a conflict. |
412 |
The server did not meet one of the preconditions contained in the request. |