Queries the performance metric logs of Elastic High Performance Computing (E-HPC).

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes GetCloudMetricLogs

The operation that you want to perform. Set the value to GetCloudMetricLogs

ClusterId String Yes ehpc-hz-jeJki6****

The ID of the cluster.

From Integer Yes 1583907780

The start time of the query. 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.

To Integer Yes 1583907790

The end time of the query. 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.

Reverse Boolean No false

logs are returned in reverse order of timestamps.

Default value: false

AggregationType String No avg

The data aggregation category. 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.

AggregationInterval Integer No 10

The data aggregation interval. Unit: seconds.

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

Default value: 1.

MetricScope String No network

The dimensions of the performance metric. Valid values:

  • machine: complete machine
  • process: process
  • Network: network
  • disk: disk
Filter String No {"Hostname":"compute000"}

The filter conditions. A JSON string consisting of one or more key:value pairs. Value range of 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
MetricCategories String No cpu

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

  • cpu
  • memory

Response parameters

Parameter Type Example Description
MetricLogs Array of MetricLog

The list of the performance data.

MetricLog
DiskDevice String vda1

The name of the disk.

Hostname String compute000

The hostname of the node.

InstanceId String i-bp132g97g7zwnvta****

The ID of the node.

MetricData String [1583907325 0.0202 0.0101 0.1088]

A JSON-serialized string that contains values for multiple performance metrics.

NetworkInterface String eth1

The name of the network interface.

Time Integer 1583907780

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

RequestId String 015C2C4D-1884-4EB7-BCD3-C5BB8D7E56DB

The ID of the request.

Examples

Sample requests

https://ehpc.cn-hangzhou.aliyuncs.com/?Action=GetCloudMetricLogs
&ClusterId=ehpc-hz-jeJki6****
&From=1583907780
&To=1583907790
&<Common request parameters>

Sample success responses

XML format

<GetCloudMetricLogsResponse>
      <RequestId>970A2FDC-0DCF-4C00-A262-65622FB23D25</RequestId>
      <MetricLogs>
            <MetricLog>
                  <InstanceId>i-bp1j5ufgjy8****</InstanceId>
                  <Hostname>login0</Hostname>
                  <Time>1583907780</Time>
                  <MetricData>{"cputil|idle":0.9708,"cputil|user":0.0181,"cputil|sys":0.0111,"cputil|iowait":0,"cputil|usage":0.0292,"memory|memusage":0.2071,"memory|memcached":0.5467,"memory|swapusage":0,"process|cpusage":0.0101,"process|cpuser":0.0101,"process|cpusys":0,"process|memusage":0.0144,"process|procName":"\"ilogtail\"","process|stat":"\"S\"","process|pid":9054,"process|vss":255467520,"process|rss":3653,"disk_usage|max_usage":0.0875,"disk_usage|total":"null","disk_usage|used":"null","disk_usage|avail":"null","disk_usage|usage":"null","disk_bw|max_bw":30.8,"disk_bw|read":"null","disk_bw|write":"null","network|recv_rate":0.4923,"network|sent_rate":3.0477,"network|max_bw":3.5399}</MetricData>
            </MetricLog>
            <MetricLog>
                  <InstanceId>i-bp132s7zwnvta****</InstanceId>
                  <Hostname>compute000</Hostname>
                  <Time>1583907780</Time>
                  <MetricData>{"disk_usage|max_usage":0.0906,"disk_usage|total":"null","disk_usage|used":"null","disk_usage|avail":"null","disk_usage|usage":"null","network|recv_rate":0.4137,"network|sent_rate":2.5123,"network|max_bw":2.926,"process|cpusage":0,"process|cpuser":0,"process|cpusys":0,"process|memusage":0.0107,"process|procName":"\"cloud-metrics-a\"","process|stat":"\"R\"","process|pid":21404,"process|vss":230797312,"process|rss":2722,"memory|memusage":0.2041,"memory|memcached":0.5456,"memory|swapusage":0,"disk_bw|max_bw":2.4,"disk_bw|read":"null","disk_bw|write":"null","cputil|idle":0.9616,"cputil|user":0.0192,"cputil|sys":0.0192,"cputil|iowait":0,"cputil|usage":0.0384}</MetricData>
            </MetricLog>
            <MetricLog>
                  <InstanceId>i-bp132g97g7zwnvta****</InstanceId>
                  <Hostname>account</Hostname>
                  <Time>1583907780</Time>
                  <MetricData>{"process|cpusage":0.02,"process|cpuser":0.01,"process|cpusys":0.01,"process|memusage":0.0108,"process|procName":"\"cloud-metrics-a\"","process|stat":"\"R\"","process|pid":21404,"process|vss":230866944,"process|rss":2754,"memory|memusage":0.1987,"memory|memcached":0.5553,"memory|swapusage":0,"cputil|idle":0.9647,"cputil|user":0.0192,"cputil|sys":0.0161,"cputil|iowait":0,"cputil|usage":0.0353,"network|recv_rate":1.0313,"network|sent_rate":3.2593,"network|max_bw":4.2906,"disk_usage|max_usage":0.0877,"disk_usage|total":"null","disk_usage|used":"null","disk_usage|avail":"null","disk_usage|usage":"null","disk_bw|max_bw":3.2,"disk_bw|read":"null","disk_bw|write":"null"}</MetricData>
            </MetricLog>
            <MetricLog>
                  <InstanceId>i-bp18uqqfw68k****</InstanceId>
                  <Hostname>compute012</Hostname>
                  <Time>1583907780</Time>
                  <MetricData>{"process|cpusage":0,"process|cpuser":0,"process|cpusys":0,"process|memusage":0.0023,"process|procName":"\"ypbind\"","process|stat":"\"S\"","process|pid":29573,"process|vss":257601536,"process|rss":1098,"disk_bw|max_bw":34.8,"disk_bw|read":"null","disk_bw|write":"null","cputil|idle":0.9698,"cputil|user":0.0161,"cputil|sys":0.0131,"cputil|iowait":0.001,"cputil|usage":0.0302,"disk_usage|max_usage":0.0968,"disk_usage|total":"null","disk_usage|used":"null","disk_usage|avail":"null","disk_usage|usage":"null","network|recv_rate":0.5299,"network|sent_rate":2.8043,"network|max_bw":3.3342,"memory|memusage":0.1081,"memory|memcached":0.7383,"memory|swapusage":0}</MetricData>
            </MetricLog>
      </MetricLogs>
</GetCloudMetricLogsResponse>

JSON format

{
	"GetCloudMetricLogsResponse":{
    "RequestId": "970A2FDC-0DCF-4C00-A262-65622FB23D25",
	"MetricLogs": {
		"MetricLog": [
			{
				"InstanceId": "i-bp1j5ufgjy8****",
				"Hostname": "login0",
				"Time": 1583907780,
				"MetricData": "{\"cputil|idle\":0.9708,\"cputil|user\":0.0181,\"cputil|sys\":0.0111,\"cputil|iowait\":0,\"cputil|usage\":0.0292,\"memory|memusage\":0.2071,\"memory|memcached\":0.5467,\"memory|swapusage\":0,\"process|cpusage\":0.0101,\"process|cpuser\":0.0101,\"process|cpusys\":0,\"process|memusage\":0.0144,\"process|procName\":\"\\\"ilogtail\\\"\",\"process|stat\":\"\\\"S\\\"\",\"process|pid\":9054,\"process|vss\":255467520,\"process|rss\":3653,\"disk_usage|max_usage\":0.0875,\"disk_usage|total\":\"null\",\"disk_usage|used\":\"null\",\"disk_usage|avail\":\"null\",\"disk_usage|usage\":\"null\",\"disk_bw|max_bw\":30.8,\"disk_bw|read\":\"null\",\"disk_bw|write\":\"null\",\"network|recv_rate\":0.4923,\"network|sent_rate\":3.0477,\"network|max_bw\":3.5399}"
			},
			{
				"InstanceId": "i-bp132s7zwnvta****",
				"Hostname": "compute000",
				"Time": 1583907780,
				"MetricData": "{\"disk_usage|max_usage\":0.0906,\"disk_usage|total\":\"null\",\"disk_usage|used\":\"null\",\"disk_usage|avail\":\"null\",\"disk_usage|usage\":\"null\",\"network|recv_rate\":0.4137,\"network|sent_rate\":2.5123,\"network|max_bw\":2.926,\"process|cpusage\":0,\"process|cpuser\":0,\"process|cpusys\":0,\"process|memusage\":0.0107,\"process|procName\":\"\\\"cloud-metrics-a\\\"\",\"process|stat\":\"\\\"R\\\"\",\"process|pid\":21404,\"process|vss\":230797312,\"process|rss\":2722,\"memory|memusage\":0.2041,\"memory|memcached\":0.5456,\"memory|swapusage\":0,\"disk_bw|max_bw\":2.4,\"disk_bw|read\":\"null\",\"disk_bw|write\":\"null\",\"cputil|idle\":0.9616,\"cputil|user\":0.0192,\"cputil|sys\":0.0192,\"cputil|iowait\":0,\"cputil|usage\":0.0384}"
			},
			{
				"InstanceId": "i-bp132g97g7zwnvta****",
				"Hostname": "account",
				"Time": 1583907780,
				"MetricData": "{\"process|cpusage\":0.02,\"process|cpuser\":0.01,\"process|cpusys\":0.01,\"process|memusage\":0.0108,\"process|procName\":\"\\\"cloud-metrics-a\\\"\",\"process|stat\":\"\\\"R\\\"\",\"process|pid\":21404,\"process|vss\":230866944,\"process|rss\":2754,\"memory|memusage\":0.1987,\"memory|memcached\":0.5553,\"memory|swapusage\":0,\"cputil|idle\":0.9647,\"cputil|user\":0.0192,\"cputil|sys\":0.0161,\"cputil|iowait\":0,\"cputil|usage\":0.0353,\"network|recv_rate\":1.0313,\"network|sent_rate\":3.2593,\"network|max_bw\":4.2906,\"disk_usage|max_usage\":0.0877,\"disk_usage|total\":\"null\",\"disk_usage|used\":\"null\",\"disk_usage|avail\":\"null\",\"disk_usage|usage\":\"null\",\"disk_bw|max_bw\":3.2,\"disk_bw|read\":\"null\",\"disk_bw|write\":\"null\"}"
			},
			{
				"InstanceId": "i-bp18uqqfw68k****",
				"Hostname": "compute012",
				"Time": 1583907780,
				"MetricData": "{\"process|cpusage\":0,\"process|cpuser\":0,\"process|cpusys\":0,\"process|memusage\":0.0023,\"process|procName\":\"\\\"ypbind\\\"\",\"process|stat\":\"\\\"S\\\"\",\"process|pid\":29573,\"process|vss\":257601536,\"process|rss\":1098,\"disk_bw|max_bw\":34.8,\"disk_bw|read\":\"null\",\"disk_bw|write\":\"null\",\"cputil|idle\":0.9698,\"cputil|user\":0.0161,\"cputil|sys\":0.0131,\"cputil|iowait\":0.001,\"cputil|usage\":0.0302,\"disk_usage|max_usage\":0.0968,\"disk_usage|total\":\"null\",\"disk_usage|used\":\"null\",\"disk_usage|avail\":\"null\",\"disk_usage|usage\":\"null\",\"network|recv_rate\":0.5299,\"network|sent_rate\":2.8043,\"network|max_bw\":3.3342,\"memory|memusage\":0.1081,\"memory|memcached\":0.7383,\"memory|swapusage\":0}"
			}
		]
	}
}
}

Error codes

HttpCode Error code Error message Description
503 ServiceUnavailable The request has failed due to a temporary failure of the server The error message returned because the request has failed. The server is temporarily unavailable.

For a list of error codes, visit the API Error Center.