Reads performance metrics (CloudMetrics) logs of E-HPC.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
ehpc:GetCloudMetricLogs | READ |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
ClusterId | string | Yes | The cluster ID. | ehpc-hz-jeJki6**** |
From | integer | Yes | The beginning of the time range to query. The time is a timestamp. This value is a UNIX timestamp representing the number of seconds that have elapsed since the epoch time January 1, 1970, 00:00:00 UTC. | 1583907780 |
To | integer | Yes | The end of the time range to query. The time is a timestamp. This value is a UNIX timestamp representing the number of seconds that have elapsed since the epoch time January 1, 1970, 00:00:00 UTC. | 1583907790 |
Reverse | boolean | No | Specifies whether to return logs in reverse order of timestamps. Default value: false. | false |
AggregationType | string | No | The data aggregation type. Valid values:
Aggregation is disabled by default. | avg |
AggregationInterval | integer | No | The data aggregation interval. Unit: seconds. Valid values: 1, 10, 60, 600, and 3600. Default value: 1. | 10 |
MetricScope | string | No | The dimensions of the performance metric. Valid values:
| network |
Filter | string | No | The filter conditions. A JSON-formatted string that contains several key-value pairs. Valid values of the key:
| {"Hostname":"compute000"} |
MetricCategories | string | No | The category of the output performance metrics. Separate multiple metrics with commas (,). Valid values:
| cpu |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "015C2C4D-1884-4EB7-BCD3-C5BB8D7E56DB",
"MetricLogs": {
"MetricLog": [
{
"Time": 1583907780,
"DiskDevice": "vda1",
"NetworkInterface": "eth1",
"MetricData": "{\\\"process|cpusage\\\":0,\\\"process|cpuser\\\":0,\\\"process|cpusys\\\":0,******}",
"Hostname": "compute000",
"InstanceId": "i-bp132g97g7zwnvta****"
}
]
}
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | InvalidParams | The specified parameter %s is invalid. | The specified parameter %s is invalid. |
400 | NotEnabled | You have not enabled this service | You have not enabled this service |
400 | InDebt | Your account has overdue payments. | Your account has overdue payments. |
403 | InvalidClusterStatus | The operation failed due to invalid cluster status. | The cluster status does not support the operation. |
403 | ConflictOpt | A conflicting operation is running. | A conflicting operation is running. Please try again later. |
404 | ClusterNotFound | The specified cluster does not exist. | The specified instance does not exist. |
404 | ObjectNotFound | The specified object is not found. | The specified object does not exist. Please verify the parameter. |
406 | SlsError | SLS API request failed. | Failed to request the SLS interface. |
406 | AgentError | The agent service request failed. | - |
406 | AliyunError | An Alibaba Cloud product error occurred. | An Alibaba Cloud product error occurred. |
406 | ExecFail | Failed to execute the command: %s. | Failed to execute the command: %s. |
407 | NotAuthorized | You are not authorized by RAM for this request. | The request is not authorized by RAM. |
500 | UnknownError | An unknown error occurred. | An unknown error occurred. |
503 | ServiceUnavailable | The request has failed due to a temporary failure of the server | The request has failed due to a temporary failure of the server. |
For a list of error codes, visit the Service error codes.