Operation description
Debugging
Authorization information
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
MetricList | object [] | Yes | ||
Type | string | Yes | The type of the reported data. Valid values of N: 1 to 21. Valid values:
Note
We recommend that you report aggregate data in both the aggregation periods of 60s and 300s. Otherwise, you cannot query monitoring data in a time span that is more than seven days.
| 0 |
MetricName | string | Yes | The name of the metric. Valid values of N: 1 to 21. For more information, see Appendix 1: Metrics. | cpu_total |
Time | string | No | The timestamp when the metric data is generated. Valid values of N: 1 to 21. The timestamp can be in one of the following formats:
| 1508136760000 |
GroupId | string | Yes | The ID of the application group. Valid values of N: 1 to 21. Note
If the metric does not belong to any application group, enter 0.
| 12345 |
Values | string | Yes | The collection of metric values. Valid values of N: 1 to 21. Note
If the MetricList.N.Type parameter is set to 0, the keys in this parameter must be set to the specified value. CloudMonitor aggregates raw data in each aggregation period to generate multiple statistical values, such as the maximum value, the count, and the total value.
| {"value":10.5} |
Dimensions | string | Yes | The dimensions that specify the resources whose monitoring data you want to query. Valid values of N: 1 to 21. Set the value to a collection of key-value pairs. Format: The key or value must be 1 to 64 bytes in length. Excessive characters are truncated. The key or value can contain letters, digits, periods (.), hyphens (-), underscores (_), forward slashes (/), and backslashes (\). Note
Dimensions must be formatted as a JSON string in a specified order.
| {"sampleName1":"value1","sampleName2":"value2"} |
Period | string | No | The aggregation period. Valid values of N: 1 to 21. Unit: seconds. Valid values: 60 and 300. Note
If the MetricList.N.Type parameter is set to 1, the MetricList.N.Period parameter is required.
| 60 |
Response parameters
Examples
Sample success responses
JSON
format
{
"Code": "200",
"Message": "The request has failed due to a temporary failure of the server.",
"RequestId": "05B36C2C-5F6E-48D5-8B41-CE36DD7EE8E0"
}
Error codes
HTTP status code | Error code | Error message |
---|---|---|
400 | %s | %s |
500 | InternalError | %s |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|