tencent cloud

腾讯云可观测平台

动态与公告
产品动态
产品简介
产品概述
产品优势
基本功能
基本概念
应用场景
使用限制
购买指南
云产品监控
应用性能监控
终端性能监控
前端性能监控
云拨测
Prometheus 监控服务
Grafana 服务
事件总线
云压测
快速入门
监控概览
实例分组
云产品监控
应用性能监控
云拨测
云压测
Prometheus 监控服务
Grafana 服务
创建 Dashboard
事件总线
告警服务
云产品监控
云产品监控指标
控制台操作指南
云服务器监控组件
云产品监控对接 Grafana
故障处理
实践教程
应用性能监控
应用性能监控简介
接入指南
控制台操作指南
实践教程
参考信息
常见问题
终端性能监控
终端性能监控概述
控制台操作指南
接入指南
实践教程
前端性能监控
前端性能监控简介
控制台操作指南
接入指南
常见问题
云拨测
产品简介
控制台操作指南
常见问题
云压测
云压测概述
控制台操作指南
实践教程
JavaScript API 列表
常见问题
Prometheus 监控
Prometheus 监控简介
接入指南
控制台操作指南
实践教程
Terraform
常见问题
Grafana 服务
产品简介
控制台操作指南
Grafana 平台常用功能指引
常见问题
Dashboard
什么是 Dashboard
控制台操作指南
告警管理
控制台操作指南
故障处理
常见问题
事件总线
事件总线简介
控制台操作指南
实践教程
常见问题
报表管理
常见问题
腾讯云可观测平台常见问题
告警服务相关
一般性问题
监控图表相关
云服务器监控组件相关
动态阈值告警相关
云监控对接 Grafana 相关
文档阅读指南
相关协议
应用性能监控服务等级协议
APM 隐私协议
APM 数据处理和安全协议
前端性能监控服务等级协议
终端性能监控服务等级协议
云拨测服务等级协议
Prometheus 监控服务服务等级协议
Grafana 服务服务等级协议
云压测服务等级协议
云压测使用限制
Cloud Monitor Service Level Agreement
API 文档
History
Introduction
API Category
Making API Requests
Monitoring Data Query APIs
Alarm APIs
Legacy Alert APIs
Notification Template APIs
TMP APIs
Grafana Service APIs
Event Center APIs
TencentCloud Managed Service for Prometheus APIs
Monitoring APIs
Data Types
Error Codes
词汇表

DescribeStatisticData

PDF
聚焦模式
字号
最后更新时间: 2025-11-13 20:45:22

1. API Description

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

This API is used to query monitoring data by dimension conditions.

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: DescribeStatisticData.
Version Yes String Common Params. The value used for this API: 2018-07-24.
Region No String Common Params. This parameter is not required for this API.
Module Yes String Module, whose value is fixed at monitor
Namespace Yes String Namespace. Valid values: QCE, TKE2.
MetricNames.N Yes Array of String Metric name list
Conditions.N No Array of MidQueryCondition Dimension condition. The = and in operators are supported
Period No Integer Statistical period in seconds. Default value: 300. Optional values: 60, 300, 3,600, and 86,400.
Due to the storage period limit, the statistical period is subject to the time range of statistics:
60s: The time range is less than 12 hours, and the timespan between StartTime and the current time cannot exceed 15 days.
300s: The time range is less than three days, and the timespan between StartTime and the current time cannot exceed 31 days.
3,600s: The time range is less than 30 days, and the timespan between StartTime and the current time cannot exceed 93 days.
86,400s: The time range is less than 186 days, and the timespan between StartTime and the current time cannot exceed 186 days.
StartTime No String Start time, which is the current time by default, such as 2020-12-08T19:51:23+08:00
EndTime No String End time, which is the current time by default, such as 2020-12-08T19:51:23+08:00
GroupBys.N No Array of String groupBy by the specified dimension

3. Output Parameters

Parameter Name Type Description
Period Integer Statistical period
StartTime String Start time
EndTime String End time
Data Array of MetricData Monitoring data
RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

4. Example

Example1 Querying monitoring data by dimension condition

This example shows you how to query the monitoring data of the metric K8sPodCpuCoreUsed.

Input Example

POST / HTTP/1.1
Host: monitor.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeStatisticData
<Common request parameters>

{
    "Module": "monitor",
    "Namespace": "QCE/TKE2",
    "MetricNames": [
        "K8sPodCpuCoreUsed"
    ],
    "Period": 300,
    "Conditions": [
        {
            "Key": "tke_cluster_instance_id",
            "Operator": "=",
            "Value": [
                "cls-mw2w40s7"
            ]
        }
    ],
    "StartTime": "2020-11-24T15:15:50+08:00",
    "EndTime": "2020-11-24T15:25:50+08:00"
}

Output Example

{
    "Response": {
        "Data": [
            {
                "MetricName": "K8sPodCpuCoreUsed",
                "Points": [
                    {
                        "Dimensions": [
                            {
                                "Name": "tke_cluster_instance_id",
                                "Value": "cls-mw2w40s7"
                            },
                            {
                                "Name": "node",
                                "Value": "cls-gn7vut9a-virtual-kubelet-subnet-node-2"
                            },
                            {
                                "Name": "pod_name",
                                "Value": "proxy-edge-j7j95"
                            },
                            {
                                "Name": "workload_name",
                                "Value": "init-test-nfs02"
                            },
                            {
                                "Name": "namespace",
                                "Value": "default-test"
                            },
                            {
                                "Name": "node_role",
                                "Value": "node"
                            },
                            {
                                "Name": "un_instance_id",
                                "Value": "cls-gn7vut9a-virtual-kubelet-subnet-nmpi5ecw-1"
                            },
                            {
                                "Name": "workload_kind",
                                "Value": "Deployment"
                            }
                        ],
                        "Values": [
                            {
                                "Timestamp": 1606202100,
                                "Value": 41.066
                            },
                            {
                                "Timestamp": 1606202400,
                                "Value": 38.666
                            },
                            {
                                "Timestamp": 1606202700,
                                "Value": 37.866
                            }
                        ]
                    },
                    {
                        "Dimensions": [
                            {
                                "Name": "namespace",
                                "Value": "default-test"
                            },
                            {
                                "Name": "node",
                                "Value": "cls-gn7vut9a-virtual-kubelet-subnet-node-3"
                            },
                            {
                                "Name": "node_role",
                                "Value": "node"
                            },
                            {
                                "Name": "pod_name",
                                "Value": "network-tools-b94d6dd89-flf7n"
                            },
                            {
                                "Name": "un_instance_id",
                                "Value": "cls-gn7vut9a-virtual-kubelet-subnet-nmpi5ecw-1"
                            },
                            {
                                "Name": "workload_kind",
                                "Value": "Deployment"
                            },
                            {
                                "Name": "workload_name",
                                "Value": "init-test-nfs00"
                            },
                            {
                                "Name": "tke_cluster_instance_id",
                                "Value": "cls-mw2w40s7"
                            }
                        ],
                        "Values": [
                            {
                                "Timestamp": 1606202100,
                                "Value": 42.666
                            },
                            {
                                "Timestamp": 1606202400,
                                "Value": 33.6
                            },
                            {
                                "Timestamp": 1606202700,
                                "Value": 40.266
                            }
                        ]
                    }
                ]
            }
        ],
        "EndTime": "2020-11-24 15:25:00",
        "Period": 300,
        "RequestId": "0d25d659-71ee-4c93-b8e1-f3992c61ff46",
        "StartTime": "2020-11-24 15:15:00"
    }
}

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.
AuthFailure.UnauthorizedOperation The request is not authorized. For more information on the authentication, see the CAM documentation.
FailedOperation Operation failed.
FailedOperation.DataColumnNotFound The data table field doesn't exist.
FailedOperation.DataQueryFailed Failed to query the data.
FailedOperation.DataTableNotFound The data table doesn't exist.
FailedOperation.DbQueryFailed Failed to query the database.
FailedOperation.DbRecordCreateFailed Failed to create the database record.
FailedOperation.DbRecordDeleteFailed Failed to delete the database record.
FailedOperation.DbRecordUpdateFailed Failed to update the database record.
FailedOperation.DbTransactionBeginFailed Failed to start the database transaction.
FailedOperation.DbTransactionCommitFailed Failed to submit the database transaction.
FailedOperation.DimQueryRequestFailed Failed to query the service in the request dimension.
FailedOperation.DivisionByZero The dividend is zero.
InternalError Internal error.
InternalError.CallbackFail Error with the callback.
InternalError.DependsApi Error with another dependent API.
InternalError.DependsDb Error with the dependent db.
InternalError.DependsMq Error with the dependent mq.
InternalError.ExeTimeout Execution timed out.
InternalError.System System error.
InternalError.TaskResultFormat An error occurred while parsing the task result.
InvalidParameter Invalid parameter.
InvalidParameter.DupTask The task has already been submitted.
InvalidParameter.InvalidParameter Invalid parameter.
InvalidParameter.InvalidParameterParam Invalid parameter.
InvalidParameter.MissAKSK The platform configuration is missing.
InvalidParameter.ParamError Incorrect parameter.
InvalidParameter.SecretIdOrSecretKeyError Error with the platform configuration.
InvalidParameter.UnsupportedProduct This product doesn't support scan.
InvalidParameterValue The parameter value is incorrect.
InvalidParameterValue.DashboardNameExists The dashboard name already exists.
InvalidParameterValue.VersionMismatch The version does not match.
LimitExceeded Quota limit is reached.
LimitExceeded.MetricQuotaExceeded Quota limit on metrics is reached. Requests containing unregistered metrics are prohibited.
MissingParameter Missing parameter.
OperationDenied Operation denied.
RequestLimitExceeded The number of requests exceeds the frequency limit.
ResourceInUse The resource is in use.
ResourceInsufficient Insufficient resources.
ResourceNotFound The resource is not found.
ResourceNotFound.NotExistTask The task does not exist.
UnauthorizedOperation Unauthorized operation.
UnknownParameter Unknown parameter.
UnsupportedOperation Unsupported operation.

帮助和支持

本页内容是否解决了您的问题?

填写满意度调查问卷,共创更好文档体验。

文档反馈