查询PolarDB集群的性能数据。
接口说明
-
若监控频率为 5 秒/次:
当查询时间范围小于等于 1 小时,显示粒度为 5 秒。
当查询时间范围小于等于 1 天,显示粒度为 1 分钟。
当查询时间范围小于等于 7 天,显示粒度为 10 分钟。
当查询时间范围小于等于 30 天,显示粒度为 1 小时。
当查询范围大于 30 天,显示粒度为 1 天。
-
若监控频率为 60 秒/次:
当查询范围小于等于 1 天,显示粒度为 1 分钟。
当查询范围小于等于 7 天,显示粒度为 10 分钟。
当查询范围小于等于 30 天,显示粒度为 1 小时。
当查询范围大于 30 天,显示粒度为 1 天。
监控频率默认为 60 秒/次,您可以调用 ModifyDBClusterMonitor 接口将其设置为 5 秒/次。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
polardb:DescribeDBClusterPerformance |
get |
*dbcluster
|
无 | 无 |
请求参数
名称 |
类型 |
必填 |
描述 |
示例值 |
DBClusterId |
string |
是 |
集群 ID。 |
pc-**************** |
Type |
string |
否 |
查询类型 |
orca |
Key |
string |
是 |
查询的性能指标,多个值间用英文逗号(,)分隔,详细参数请参见性能参数表。 说明
最多可传入 5 个查询的性能指标。 |
PolarDBDiskUsage |
StartTime |
string |
是 |
查询开始时间。格式为 |
2020-09-23T01:01Z |
EndTime |
string |
是 |
查询结束时间。格式为 |
2020-09-23T01:00Z |
Interval |
string |
否 |
性能数据粒度。取值范围如下:
|
60 |
SubGroupName |
string |
否 |
返回参数
名称 |
类型 |
描述 |
示例值 |
object |
|||
PerformanceKeys |
object |
||
PerformanceItem |
array<object> |
集群性能数据列表。 |
|
object |
|||
MetricName |
string |
具体的性能指标度量名称。 |
mean_data_size |
Measurement |
string |
性能指标。 |
PolarDBDiskUsage |
Points |
object |
||
PerformanceItemValue |
array<object> |
性能数据数组。 |
|
object |
|||
Value |
string |
监控指标数据值。 |
42.38 |
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": "mean_data_size",
"Measurement": "PolarDBDiskUsage",
"Points": {
"PerformanceItemValue": [
{
"Value": "42.38",
"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 | InvalidKey.Malformed | The specified parameter Key is not valid. | 指定的参数键无效 |
400 | InvalidEndTime.Malformed | The specified parameter EndTime is not valid. | 指定的参数EndTime无效 |
400 | InvalidStartTime.Malformed | The specified parameter StartTime is not valid. | 指定的参数StartTime无效 |
400 | InvalidParameterCombination | The end time must be greater than the start time. | 结束时间必须大于开始时间 |
400 | InvalidDateRange.Malformed | The Date Range can not more than one month. | 日期范围不能超过一个月。 |
404 | InvalidDBClusterId.NotFound | The DBClusterId provided does not exist in our records. | 当前的记录中不存在提供的 DBClusterId。 |
404 | InvalidDBClusterId.Malformed | The specified parameter DBClusterId is not valid. | 指定的参数DBClusterId无效 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。