Call the ListLogstashLog to view the logs of the Logstash instance.


OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request headers

This operation uses only the common request header. For more information, see Common request parameters.

Request syntax

     GET /openapi/logstashes/[InstanceId]/search-log HTTP/1.1 

Request parameters

Parameter Type Position Required Example Description
InstanceId String Path Yes ls-cn-v0h1kzca****

The ID of the instance.

query String Query Yes host:10.7.xx.xx AND level:info AND content:opening

The keyword used to match log entries.


The type of the logs. Optional values: LOGSTASH_INSTANCE_LOG (master log), SEARCHSLOW(search slow log), INDEXINGSLOW(indexing slow log), JMVLOG(GC log), LOGSTASH_DEBUG_LOG (debug log).

beginTime Long Query No 1531910852074

The timestamp of the log start. Unit: milliseconds.

endTime Long Query No 1531910852074

The timestamp of the end of the log. Unit: milliseconds.

page Integer Query No 1

The page number of the returned page. Default value: 1, minimum value: 1, maximum value: 200.

size Integer Query No 20

The number of entries to return on each page. Default value: 20, minimum value: 1, maximum value: 100.

Response parameters

Parameter Type Example Description
RequestId String 7F40EAA1-6F1D-4DD9-8DB8-C5F00C4E****

The ID of the request.

Result Array of Result

The return results.

content String [logstash.outputs.fileextend] Opening file {:path=>\"/ssd/1/ls-cn-v0h1kzca****/logstash/logs/debug/test\"}

The details of the log.

host String 192.168.xx.xx

The IP address of the node that generates the log entry.

instanceId String ls-cn-v0h1kzca****

The ID of the Elasticsearch instance.

level String info

The severity level of the log entry. Including trace, debug, info, warn, error, etc. (GC logs have no level).

timestamp Long 1531985112420

The timestamp of log generation. Unit: milliseconds.

The following parameters are also included in the returned data.







The returned results.




The time when the log entry was generated.



The header of the response.




The number of returned logs.

Note └ indicates a child parameter.


Sample requests

     GET /openapi/logstashes/ls-cn-v0h1kzca****/search-log?type=LOGSTASH_INSTANCE_LOG&query=host:10.7.xx.xx AND level:info AND content:opening&beginTime=1531910852074&endTime=1531910852074&page=1&size=20 HTTP/1.1 public request header 

Sample success responses

JSON format

     { "Result": [ { "timestamp": 1595408280506, "host": "10.7.**.**", "contentCollection": { "level": "info", "host": "10.7.**.**", "time": "2020-07-22T16:58:00.506Z", "content": "[logstash.outputs.fileextend] Opening file {:path=>\"/ssd/1/ls-cn-v0h1kzca****/logstash/logs/debug/test\"}" }, "instanceId": "ls-cn-v0h1kzca****" } ], "RequestId": "DADBEFD2-570D-48EE-ABE4-0E3017D8****", "Headers": { "X-Total-Count": 1 } } 

Error codes

HttpCode Error code Error message Description
400 InstanceActivating Instance is activating. The instance is currently in effect.
400 InstanceNotFound The instanceId provided does not exist. The instance cannot be found. Please check the instance status.

For a list of error codes, visit the API Error Center.