You can call the DescribeDrdsInstanceMonitor operation to query performance monitoring data for a PolarDB-X instance.
Description
This operation queries performance monitoring data for an instance within a specified time range based on performance metrics. By default, if you do not specify the PeriodMultiple parameter, the statistical period varies based on the time range:
- If the time range is less than 1 day, the statistical period is 5 minutes.
- If the time range is more than 1 day but less than 2 days, the statistical period is 10 minutes.
- If the time range is more than 2 days but less than 5 days, the statistical period is 30 minutes.
- If the time range is more than 5 days but less than one week, the statistical period is 1 hour.
- If the time range is more than one week, the query is not supported.
Request parameters
| Parameter name | Type | Required | Description |
| Action | String | Yes | A required parameter. Set the value to DescribeDrdsInstanceMonitor. |
| DrdsInstanceId | String | Yes | The ID of the PolarDB-X instance. |
| Key | String | Yes | The performance metrics. Separate multiple metrics with commas (,). For more information, see the Performance metrics table. |
| StartTime | Long | Yes | The start time of the query. This is a UNIX timestamp in milliseconds. For example: 1542814801930. |
| EndTime | Long | Yes | The end time of the query. This is a UNIX timestamp in milliseconds. For example: 1542944401930. |
| PeriodMultiple | Integer | No | The multiplier for the statistical period. The final statistical period is 5 minutes × PeriodMultiple. For example, if you set PeriodMultiple to 2, the statistical period is 10 minutes. If you set it to 12, the statistical period is 1 hour. If you do not specify this parameter, the default statistical period is used as described in the Description section. |
| Key-Value | Description |
| cpu | CPU utilization (Unit: %) |
| net | Network traffic (Unit: kbps) |
| lqps | Logical queries per second (QPS) |
| pqps | Physical QPS |
| lrt | Logical response time (RT) (Unit: ms) |
| prt | Physical RT (Unit: ms) |
| con | Number of connections |
| thread | Number of active threads |
Return values
| Parameter | Type | Description |
| data | List | An array that consists of PartialPerformanceData objects. |
| Parameter | Type | Description |
| Key | String | The performance metric. For more information, see the Performance metrics table. |
| Unit | String | The unit of the performance metric value. |
| Values | List | An array that consists of PerformanceValue objects. It contains the values of the specified performance metric at different points in time. |
| Parameter | Type | Description |
| Date | Long | A UNIX timestamp in milliseconds. |
| Value | String | The value of the performance metric at the corresponding time. |
Error codes
| Error code | Error message | Fault description | HTTP status code |
| ServiceUnable | DRDS service is not enable for you | The service is not activated. | 400 |
| ActionUnauthorized | The specified action is not available for you | You are not authorized to perform this action. | 400 |
| InvalidDRDSInstanceId.NotFound | The DrdsInstanceId provided does not exist in our records. | The specified instance ID does not exist. | 404 |
| InvalidParameter.time | The startTime and endTime must in one week | The time range cannot exceed one week. | 400 |
| InvalidParameter.periodMultiple | The periodMultiple is too larger than the time between startTime and endTime | The statistical period, which is calculated as PeriodMultiple × 5 minutes, exceeds the specified time range (EndTime - StartTime). | - |
该文章对您有帮助吗?