调用DescribeDBProxyPerformance接口查询PolarDB代理层(PolarProxy)的性能数据。
说明 该接口仅适用于PolarDB MySQL版。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | DescribeDBProxyPerformance | 系统规定参数。取值:DescribeDBProxyPerformance。 |
DBClusterId | String | 是 | pc-**************** | 集群ID。 |
Key | String | 是 | PolarProxy_CpuUsage | 查询的性能指标,多个值间用英文逗号(,)分隔,详细参数请参见性能参数表。 |
StartTime | String | 是 | 2020-09-23T01:01Z | 查询开始时间。格式为 |
EndTime | String | 是 | 2020-09-24T02:08Z | 查询结束时间。格式为 |
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
PerformanceKeys | Array of PerformanceItem | 集群性能数据列表。 |
|
PerformanceItem | |||
MetricName | String | service_connections_ps | 具体的性能指标度量名称。 |
Measurement | String | PolarProxy_CpuUsage | 性能指标。 |
Points | Array of PerformanceItemValue | 性能数据数组。 |
|
PerformanceItemValue | |||
Value | String | 10 | 监控指标数据值。 |
Timestamp | Long | 1600822800000 | 监控指标的具体时间点,格式为时间戳,单位为毫秒。 |
DBNodeId | String | pi-************* | 数据库集群节点ID。 |
DBVersion | String | 8.0 | 兼容数据库版本。 |
EndTime | String | 2020-09-23T01:01:00Z | 查询结束时间。格式: |
RequestId | String | 35D3E3DA-4650-407A-BFF5-59BFF1****** | 请求ID。 |
StartTime | String | 2020-09-23T01:00:00Z | 查询开始时间。格式: |
DBClusterId | String | pc-***************** | 数据库集群ID。 |
DBType | String | MySQL | 兼容数据库类型。 |
示例
请求示例
http(s)://polardb.aliyuncs.com/?Action=DescribeDBProxyPerformance
&DBClusterId=pc-****************
&Key=PolarProxy_CpuUsage
&StartTime=2020-09-23T01:01Z
&EndTime=2020-09-24T02:08Z
&<公共请求参数>
正常返回示例
XML
格式
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribeDBProxyPerformanceResponse>
<PerformanceKeys>
<MetricName>service_connections_ps</MetricName>
<Measurement>PolarProxy_CpuUsage</Measurement>
<Points>
<Value>10</Value>
<Timestamp>1600822800000</Timestamp>
</Points>
<DBNodeId>pi-*************</DBNodeId>
</PerformanceKeys>
<DBVersion>8.0</DBVersion>
<EndTime>2020-09-23T01:01:00Z</EndTime>
<RequestId>35D3E3DA-4650-407A-BFF5-59BFF1******</RequestId>
<StartTime>2020-09-23T01:00:00Z</StartTime>
<DBClusterId>pc-*****************</DBClusterId>
<DBType>MySQL</DBType>
</DescribeDBProxyPerformanceResponse>
JSON
格式
HTTP/1.1 200 OK
Content-Type:application/json
{
"PerformanceKeys" : [ {
"MetricName" : "service_connections_ps",
"Measurement" : "PolarProxy_CpuUsage",
"Points" : [ {
"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"
}
错误码
HttpCode | 错误码 | 错误信息 | 描述 |
---|---|---|---|
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。 |
访问错误中心查看更多错误码。