All Products
Search
Document Center

:DescribeDiagnosticMetrics

更新時間:Dec 06, 2023

Queries diagnostic metrics.

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 DescribeDiagnosticMetrics

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

RegionId String Yes cn-hangzhou

The region ID of the diagnostic metric. You can call the DescribeRegions operation to query the most recent region list.

MetricIds.N String No Instance.DiskLoadFailure

The ID of diagnostic metric N.

ResourceType String No instance

The resource type supported by the diagnostic metric.

NextToken String No caeba0bbb2be03f84eb48b699f0a4883

The pagination token that is used in the next request to retrieve a new page of results. You do not need to specify this parameter for the first request. You must specify the token that is obtained from the previous query as the value of NextToken.

MaxResults Integer No 10

The number of entries per page. Valid values: 1 to 100.

Default value:

  • If this parameter is left empty, the default value is 10.
  • If this parameter is set to a value greater than 100, the default value is 100.

Response parameters

Parameter

Type

Example

Description

RequestId String 473469C7-AA6F-4DC5-B3DB-A3DC0DE*****

The ID of the request.

NextToken String caeba0bbb2be03f84eb48b699f0a4883

A pagination token. It can be used in the next request to retrieve a new page of results.

Metrics Array of Metric

The diagnostic metrics.

MetricId String GuestOS.WinFirewall

The ID of the diagnostic metric.

MetricName String CPU diagnostics

The name of the diagnostic metric.

MetricCategory String CPU

The category of the diagnostic metric.

Description String CPU diagnostics

The description of the diagnostic metric.

ResourceType String instance

The resource type supported by the diagnostic metric.

GuestMetric Boolean true

Indicates whether the diagnostic metric needs to be assessed by running a Cloud Assistant command in a guest operating system.

SupportedOperatingSystem String ALL

The operating system type supported by the diagnostic metric. Valid values:

  • Windows
  • Linux
  • All: both Windows and Linux

Examples

Sample requests

http(s)://ecs.aliyuncs.com/?Action=DescribeDiagnosticMetrics
&RegionId=cn-hangzhou
&MetricIds=["Instance.DiskLoadFailure"]
&ResourceType=instance
&NextToken=caeba0bbb2be03f84eb48b699f0a4883
&MaxResults=10
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<DescribeDiagnosticMetricsResponse>
    <RequestId>473469C7-AA6F-4DC5-B3DB-A3DC0DE*****</RequestId>
    <NextToken>caeba0bbb2be03f84eb48b699f0a4883</NextToken>
    <Metrics>
        <MetricId>GuestOS.WinFirewall</MetricId>
        <MetricName>CPU diagnostics</MetricName>
        <MetricCategory>CPU</MetricCategory>
        <Description>CPU diagnostics</Description>
        <ResourceType>instance</ResourceType>
        <GuestMetric>true</GuestMetric>
        <SupportedOperatingSystem>ALL</SupportedOperatingSystem>
    </Metrics>
</DescribeDiagnosticMetricsResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "473469C7-AA6F-4DC5-B3DB-A3DC0DE*****",
  "NextToken" : "caeba0bbb2be03f84eb48b699f0a4883",
  "Metrics" : [ {
    "MetricId" : "GuestOS.WinFirewall",
    "MetricName" : "CPU diagnostics",
    "MetricCategory" : "CPU",
    "Description" : "CPU diagnostics",
    "ResourceType" : "instance",
    "GuestMetric" : true,
    "SupportedOperatingSystem" : "ALL"
  } ]
}

Error codes

For a list of error codes, see Service error codes.