DescribeSlowLogTimeSeriesStats

Last updated: 2021-03-08 18:51:12

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 5 requests can be initiated per second for this API.

Note: This API supports Finance regions. If the common parameter Region is a Finance region, a domain name with the Finance region needs to be specified, for example: dbbrain.ap-shanghai-fsi.tencentcloudapi.com

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 parameter. The value used for this API: DescribeSlowLogTimeSeriesStats.
Version Yes String Common parameter. The value used for this API: 2019-10-16.
Region Yes String Common parameter. For more information, please see the list of regions supported by the product.
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 (TencentDB for CynosDB (compatible with 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 specified time range.
SeriesData MonitorMetricSeriesData Instance CPU utilization monitoring data in 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
      },
      {