tencent cloud

Elasticsearch Service

DescribeInstanceLogs

Unduh
Mode fokus
Ukuran font
Terakhir diperbarui: 2026-10-13 13:26:47

1. API Description

Domain name for API request: es.intl.tencentcloudapi.com.

Query the logs of eligible ES clusters in that region for the user.

A maximum of 50 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common Params. The value used for this API: DescribeInstanceLogs.
Version Yes String Common Params. The value used for this API: 2018-04-16.
Region Yes String Common Params. For more information, please see the list of regions supported by the product.
InstanceId Yes String Cluster instance ID.
LogType No Integer Log type. Default value: 1.
  • 1, master log
  • 2. Search slow logs
  • 3. Index slow log
  • 4. GC log
  • SearchKey No String Search term. LUCENE grammar is supported, for example, level:WARN, ip:1.1.1.1, message:test-index
    StartTime No String Log start time in the format of YYYY-MM-DD HH:MM:SS, for example, 2019-01-22 20:15:53
    EndTime No String Log end time in the format of YYYY-MM-DD HH:MM:SS, for example, 2019-01-22 20:15:53
    Offset No Integer Pagination starting value. Default value: 0.
    Limit No Integer Pagination size. Default value: 100. Maximum value: 100.
    OrderByType No Integer Time sort method. Default value: 0.
  • 0: descending order
  • 1, ascending
  • LogLevels.N No Array of String Log level
    NodeIds.N No Array of String Node ID.
    IndexName No String Slow log index name
    ShardId No String Slow log index shards
    QueryCost No Integer Slow log query time

    3. Output Parameters

    Parameter Name Type Description
    TotalCount Integer Number of returned log entries
    InstanceLogList Array of InstanceLog List of log details
    RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

    4. Example

    Example1 Query ES cluster logs

    Query the latest master log of an instance

    Input Example

    https://es.intl.tencentcloudapi.com/?Action=DescribeInstanceLogs
    &InstanceId=es-f5mwm28u
    &<Common request parameters>

    Output Example

    {
        "Response": {
            "TotalCount": 71633,
            "InstanceLogList": [
                {
                    "Time": "2019-01-22T10:45:36.220+08:00",
                    "Ip": "10.0.128.65",
                    "NodeID": "2131414141414",
                    "Level": "INFO",
                    "Message": "[o.e.p.o.OPackActionFilter] [1547723102001286009] forbidden request: { ID:cdcxxxabc, TYP:MainRequest, USR:null, BRS:false, ACT:cluster:monitor/main, OA:10.0.128.43, IDX:, MET:GET, PTH:/, CNT:<OMITTED, LENGTH=0>, HDR:content-length, EFF:0 } Reason: null"
                },
                {
                    "Time": "2019-01-22T10:45:35.730+08:00",
                    "Ip": "10.0.128.65",
                    "NodeID": "2131414141414",
                    "Level": "INFO",
                    "Message": "[o.e.p.o.OPackActionFilter] [1547723102001286009] forbidden request: { ID:1a8axxxabc, TYP:MainRequest, USR:null, BRS:false, ACT:cluster:monitor/main, OA:10.0.128.73, IDX:, MET:GET, PTH:/, CNT:<OMITTED, LENGTH=0>, HDR:content-length, EFF:0 } Reason: null"
                }
            ],
            "RequestId": "783d9290-dc60-4862-9340-10b632605374"
        }
    }

    5. Developer Resources

    SDK

    TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

    Command Line Interface

    6. Error Code

    The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

    Error Code Description
    FailedOperation.RequestTimeOut Request timeout.
    InternalError Internal error.
    InvalidParameter.InvalidAppId The APPID value does not match the expectation.
    InvalidParameter.InvalidInstanceId Invalid InstanceId. No corresponding resources were found.
    InvalidParameter.InvalidLimit The value of the pagination size Limit does not match the expectation.
    InvalidParameter.InvalidLogType The value of the log type LogType does not match the expected value.
    InvalidParameter.InvalidOffset The pagination starting value Offset does not match the expectation.
    InvalidParameter.InvalidOrderByKey The value of the sorting field OrderByKey does not match the expected value.
    InvalidParameter.InvalidQueryString Invalid lucene syntax
    InvalidParameter.InvalidRegion The Region value does not meet the expectation.
    InvalidParameter.InvalidTimeParam The value or format of a time-related parameter does not match the expected one.
    LimitExceeded.ResponsePackageOversize packet size of the backend service exceeded the quota limit
    LimitExceeded.ResponseTimeout time of the backend service exceeded the quota limit
    ResourceNotFound.ClusterInfoNotFound Failed to obtain the cluster resource.
    ResourceNotFound.DBInfoNotFound Failed to obtain the database resource.

    Bantuan dan Dukungan

    Apakah halaman ini membantu?

    masukan