tencent cloud

文档反馈

DescribeSlowLogTimeSeriesStats

最后更新时间:2023-10-17 10:51:53

    1. API Description

    Domain name for API request: dbbrain.tencentcloudapi.com.

    This API is used to get the slow log statistics histogram.

    A maximum of 20 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: DescribeSlowLogTimeSeriesStats.
    Version Yes String Common Params. The value used for this API: 2021-05-27.
    Region No String Common Params. This parameter is not required for this API.
    InstanceId Yes String Instance ID.
    StartTime Yes Timestamp Start time, such as "2019-09-10 12:13:14".
    EndTime Yes Timestamp End time, such as "2019-09-10 12:13:14". The interval between the end time and the start time can be up to 7 days.
    Product No String Service type. Valid values: mysql (TencentDB for MySQL), cynosdb (TDSQL-C for MySQL). Default value: mysql.

    3. Output Parameters

    Parameter Name Type Description
    Period Integer Time range in seconds in histogram.
    TimeSeries Array of TimeSlice Number of slow logs in the specified time range.
    SeriesData MonitorMetricSeriesData Instance CPU utilization monitoring data in the specified time range.
    RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

    4. Example

    Example1 Getting the slow log statistics histogram

    Input Example

    https://dbbrain.tencentcloudapi.com/?Action=DescribeSlowLogTimeSeriesStats
    &InstanceId=test
    &StartTime=2019-01-01 00:00:00
    &EndTime=2019-01-01 01:00:00
    &<Common request parameters>
    

    Output Example

    {
        "Response": {
            "TimeSeries": [
                {
                    "Count": 0,
                    "Timestamp": 1568113800
                },
                {
                    "Count": 0,
                    "Timestamp": 1568191680
                },
                {
                    "Count": 0,
                    "Timestamp": 1568269560
                },
                {
                    "Count": 0,
                    "Timestamp": 1568347440
                },
                {
                    "Count": 2,
                    "Timestamp": 1568425320
                },
                {
                    "Count": 0,
                    "Timestamp": 1568503200
                },
                {
                    "Count": 0,
                    "Timestamp": 1568581080
                },
                {
                    "Count": 0,
                    "Timestamp": 1568658960
                },
                {
                    "Count": 0,
                    "Timestamp": 1568736840
                },
                {
                    "Count": 0,
                    "Timestamp": 1568814720
                },
                {
                    "Count": 0,
                    "Timestamp": 1568892600
                },
                {
                    "Count": 0,
                    "Timestamp": 1568970480
                },
                {
                    "Count": 0,
                    "Timestamp": 1569048360
                },
                {
                    "Count": 0,
                    "Timestamp": 1569126240
                },
                {
                    "Count": 0,
                    "Timestamp": 1569204120
                },
                {
                    "Count": 0,
                    "Timestamp": 1569282000
                },
                {
                    "Count": 0,
                    "Timestamp": 1569359880
                },
                {
                    "Count": 0,
                    "Timestamp": 1569437760
                },
                {
                    "Count": 0,
                    "Timestamp": 1569515640
                },
                {
                    "Count": 0,
                    "Timestamp": 1569593520
                },
                {
                    "Count": 0,
                    "Timestamp": 1569671400
                },
                {
                    "Count": 0,
                    "Timestamp": 1569749280
                },
                {
                    "Count": 0,
                    "Timestamp": 1569827160
                },
                {
                    "Count": 0,
                    "Timestamp": 1569905040
                },
                {
                    "Count": 0,
                    "Timestamp": 1569982920
                },
                {
                    "Count": 0,
                    "Timestamp": 1570060800
                },
                {
                    "Count": 0,
                    "Timestamp": 1570138680
                },
                {
                    "Count": 0,
                    "Timestamp": 1570216560
                },
                {
                    "Count": 0,
                    "Timestamp": 1570294440
                },
                {
                    "Count": 0,
                    "Timestamp": 1570372320
                },
                {
                    "Count": 0,
                    "Timestamp": 1570450200
                }
            ],
            "SeriesData": {
                "Series": [
                    {
                        "Values": [
                            -1,
                            -1,
                            -1,
                            -1,
                            -1,
                            -1,
                            -1,
                            -1,
                            -1,
                            -1,
                            -1,
                            -1,
                            -1,
                            -1,
                            -1,
                            -1,
                            -1,
                            -1,
                            -1,
                            -1,
                            -1,
                            -1,
                            -1,
                            -1,
                            -1,
                            -1,
                            -1,
                            -1,
                            -1,
                            -1,
                            -1
                        ],
                        "Metric": "cpu_use_rate",
                        "Unit": "%"
                    }
                ],
                "Timestamp": [
                    1568113800,
                    1568191680,
                    1568269560,
                    1568347440,
                    1568425320,
                    1568503200,
                    1568581080,
                    1568658960,
                    1568736840,
                    1568814720,
                    1568892600,
                    1568970480,
                    1569048360,
                    1569126240,
                    1569204120,
                    1569282000,
                    1569359880,
                    1569437760,
                    1569515640,
                    1569593520,
                    1569671400,
                    1569749280,
                    1569827160,
                    1569905040,
                    1569982920,
                    1570060800,
                    1570138680,
                    1570216560,
                    1570294440,
                    1570372320,
                    1570450200
                ]
            },
            "RequestId": "b445f8ee-9357-4d93-83c2-3596f9d1f27e",
            "Period": 77880
        }
    }
    

    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
    AuthFailure Error with CAM signature/authentication.
    FailedOperation Operation failed.
    FailedOperation.SegmentLoading
    InternalError Internal error.
    InvalidParameter Incorrect parameter.
    InvalidParameterValue Incorrect parameter value.
    LimitExceeded The quota limit is exceeded.
    MissingParameter Missing parameter.
    OperationDenied Operation denied.
    OperationDenied.UserHasNoStrategy Error with CAM authentication.
    ResourceNotFound The resource does not exist.
    UnauthorizedOperation The operation is unauthorized.
    UnknownParameter Unknown parameter.
    UnsupportedOperation Unsupported operation.
    联系我们

    联系我们,为您的业务提供专属服务。

    技术支持

    如果你想寻求进一步的帮助,通过工单与我们进行联络。我们提供7x24的工单服务。

    7x24 电话支持