All Products
Search
Document Center

Elastic High Performance Computing:GetCloudMetricLogs

Last Updated:Apr 26, 2024

Reads performance metrics (CloudMetrics) logs of E-HPC.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

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.
OperationAccess levelResource typeCondition keyAssociated operation
ehpc:GetCloudMetricLogsREAD
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ClusterIdstringYes

The cluster ID.

ehpc-hz-jeJki6****
FromintegerYes

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
TointegerYes

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
ReversebooleanNo

Specifies whether to return logs in reverse order of timestamps. Default value: false.

false
AggregationTypestringNo

The data aggregation type. Valid values:

  • sum: the sum of the data
  • avg: the average value
  • max: the maximum value
  • min: the minimum value

Aggregation is disabled by default.

avg
AggregationIntervalintegerNo

The data aggregation interval. Unit: seconds.

Valid values: 1, 10, 60, 600, and 3600.

Default value: 1.

10
MetricScopestringNo

The dimensions of the performance metric. Valid values:

  • machine
  • process
  • network
  • disk
network
FilterstringNo

The filter conditions. A JSON-formatted string that contains several key-value pairs. Valid values of the key:

  • InstanceId: the ID of the node
  • Hostname: the hostname of the node
  • NetworkInterface: the name of the network interface
  • DiskDevice: the name of the disk
{"Hostname":"compute000"}
MetricCategoriesstringNo

The category of the output performance metrics. Separate multiple metrics with commas (,). Valid values:

  • cpu
  • memory
cpu

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

015C2C4D-1884-4EB7-BCD3-C5BB8D7E56DB
MetricLogsobject []

The queried performance metric data.

Timeinteger

The timestamp of the log. 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
DiskDevicestring

The name of the disk.

vda1
NetworkInterfacestring

The name of the network interface.

eth1
MetricDatastring

A JSON-formatted serialized string that contains performance metric data of multiple categories.

{\"process|cpusage\":0,\"process|cpuser\":0,\"process|cpusys\":0,******}
Hostnamestring

The hostname of the node.

compute000
InstanceIdstring

The node ID.

i-bp132g97g7zwnvta****

Examples

Sample success responses

JSONformat

{
  "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 codeError codeError messageDescription
400InvalidParamsThe specified parameter %s is invalid.The specified parameter %s is invalid.
400NotEnabledYou have not enabled this serviceYou have not enabled this service
400InDebtYour account has overdue payments.Your account has overdue payments.
403InvalidClusterStatusThe operation failed due to invalid cluster status.The cluster status does not support the operation.
403ConflictOptA conflicting operation is running.A conflicting operation is running. Please try again later.
404ClusterNotFoundThe specified cluster does not exist.The specified instance does not exist.
404ObjectNotFoundThe specified object is not found.The specified object does not exist. Please verify the parameter.
406SlsErrorSLS API request failed.Failed to request the SLS interface.
406AgentErrorThe agent service request failed.-
406AliyunErrorAn Alibaba Cloud product error occurred.An Alibaba Cloud product error occurred.
406ExecFailFailed to execute the command: %s.Failed to execute the command: %s.
407NotAuthorizedYou are not authorized by RAM for this request.The request is not authorized by RAM.
500UnknownErrorAn unknown error occurred.An unknown error occurred.
503ServiceUnavailableThe request has failed due to a temporary failure of the serverThe request has failed due to a temporary failure of the server.

For a list of error codes, visit the Service error codes.