查询PolarDB代理层(PolarProxy)的性能数据。
接口说明
该接口仅适用于 PolarDB MySQL 版。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
polardb:DescribeDBProxyPerformance |
get |
*DBCluster
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| DBClusterId |
string |
是 |
集群 ID。 |
pc-**************** |
| DBEndpointId |
string |
否 |
数据库代理连接地址 ID。支持集群地址与自定义地址的查询,不支持主地址的查询。不传则默认查询集群地址。 |
pe-**************** |
| Interval |
string |
否 |
性能数据粒度。取值范围如下:
|
60 |
| Type |
string |
否 |
特殊指标,目前仅支持 tair(PolarTair 架构)。 |
tair |
| Key |
string |
是 |
查询的性能指标,多个值间用英文逗号(,)分隔,详细参数请参见性能参数表。 |
PolarProxy_CpuUsage |
| StartTime |
string |
是 |
查询开始时间。格式为 |
2020-09-23T01:01Z |
| EndTime |
string |
是 |
查询结束时间。格式为 |
2020-09-24T02:08Z |
| DBNodeId |
string |
否 |
数据库实例节点 ID。用于查询 Proxy 在不同 DB 节点上的指标,支持指标为 PolarProxy_DBConns、PolarProxy_DBQps、PolarProxy_DBActionOps。 |
pi-**************** |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| PerformanceKeys |
object |
||
| PerformanceItem |
array<object> |
集群性能数据列表。 |
|
|
array<object> |
|||
| MetricName |
string |
具体的性能指标度量名称。 |
service_connections_ps |
| Measurement |
string |
性能指标。 |
PolarProxy_CpuUsage |
| Points |
object |
||
| PerformanceItemValue |
array<object> |
性能数据数组。 |
|
|
object |
|||
| Value |
string |
监控指标数据值。 |
10 |
| Timestamp |
integer |
监控指标的具体时间点,格式为时间戳,单位为毫秒。 |
1600822800000 |
| DBNodeId |
string |
数据库集群节点 ID。 |
pi-************* |
| DBVersion |
string |
兼容数据库版本。 |
8.0 |
| EndTime |
string |
查询结束时间。格式: |
2020-09-23T01:01:00Z |
| RequestId |
string |
请求 ID。 |
35D3E3DA-4650-407A-BFF5-59BFF1****** |
| StartTime |
string |
查询开始时间。格式: |
2020-09-23T01:00:00Z |
| DBClusterId |
string |
数据库集群 ID。 |
pc-***************** |
| DBType |
string |
兼容数据库类型。 |
MySQL |
示例
正常返回示例
JSON格式
{
"PerformanceKeys": {
"PerformanceItem": [
{
"MetricName": "service_connections_ps",
"Measurement": "PolarProxy_CpuUsage",
"Points": {
"PerformanceItemValue": [
{
"Value": "10",
"Timestamp": 1600822800000
}
]
},
"DBNodeId": "pi-*************"
}
]
},
"DBVersion": "8.0",
"EndTime": "2020-09-23T01:01:00Z",
"RequestId": "35D3E3DA-4650-407A-BFF5-59BFF1******",
"StartTime": "2020-09-23T01:00:00Z",
"DBClusterId": "pc-*****************",
"DBType": "MySQL"
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | InvalidParameterCombination | The end time must be greater than the start time. | 结束时间必须大于开始时间 |
| 400 | InvalidStartTime.Malformed | The specified parameter StartTime is not valid. | 指定的参数StartTime无效 |
| 400 | InvalidEndTime.Malformed | The specified parameter EndTime is not valid. | 指定的参数EndTime无效 |
| 400 | InvalidKey.Malformed | The specified parameter Key is not valid. | 指定的参数键无效 |
| 404 | InvalidDBClusterId.NotFound | The DBClusterId provided does not exist in our records. | 当前的记录中不存在提供的 DBClusterId。 |
| 404 | InvalidDBEndpointId.NotFound | The DBEndpointId provided does not exist in our records. | 当前的记录中不存在提供的DBEndpointId。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。