Queries availability monitoring tasks.

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 DescribeHostAvailabilityList

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

Id Long No 123456

The ID of the availability monitoring task.

TaskName String No My availability monitoring task

The name of the availability monitoring task.

PageNumber Integer No 1

The number of the page to return.

PageSize Integer No 10

The number of entries to return on each page.

GroupId Long No 12345

The ID of the application group.

Response parameters

Parameter Type Example Description
RequestId String CE26797C-1094-47E6-B651-73AA888F5873

The ID of the request.

Code String 200

The HTTP status code.

Note The status code 200 indicates that the call was successful.
Success Boolean true

Indicates whether the call was successful. The value true indicates a success. The value false indicates a failure.

TaskList Array N/A

The availability monitoring tasks that were queried.

NodeTaskConfig N/A N/A N/A
AlertConfig Struct N/A

The configurations of the alert rule.

EndTime Integer 23

The end of the time period during which the alert rule is effective. Valid values: 0 to 23.

EscalationList Array N/A

The trigger condition of the alert rule.

escalationList N/A N/A N/A
Aggregate String Value

The method used to calculate metric values that trigger alerts. The value of this parameter varies with the metric. The following content lists the mappings between metrics and calculation methods:

  • HttpStatus: Value
  • HttpLatency: Average
  • TelnetStatus: Value
  • TelnetLatency: Average
  • PingLostRate: Average
Note The value Value indicates the original value and is used for metrics such as status codes. The value Average indicates the average value and is used for metrics such as latency and packet loss rates.
MetricName String HttpStatus

The metric for which the alert feature is enabled. Valid values:

  • HttpStatus
  • HttpLatency
  • TelnetStatus
  • TelnetLatency
  • PingLostRate
Operator String >

The comparison operator used in the alert rule. Valid values:

  • >
  • >=
  • <
  • <=
  • =
Times String 2

The consecutive number of times for which the metric value is measured before an alert is triggered.

Value String 99

The threshold for triggering alerts.

NotifyType Integer 1

The alert notification methods. Valid values:

Set the value to 0. The value 0 indicates that alert notifications are sent by using emails and DingTalk chatbots.

SilenceTime Integer 86400

The mute period during which notifications are not repeatedly sent for an alert. Unit: seconds. Default value: 86400, which equals to one day.

StartTime Integer 0

The beginning of the time period during which the alert rule is effective. Valid values: 0 to 23.

WebHook String http://www.aliyun.com

The callback URL.

Disabled Boolean false

Indicates whether the availability monitoring task is disabled. The value true indicates that the availability monitoring task is disabled. The value false indicates that the availability monitoring task is enabled.

GroupId Long 12345

The ID of the application group.

GroupName String Application group name

The name of the application group.

Id Long 123

The ID of the availability monitoring task.

Instances List i-abcdefgh12****

The Elastic Compute Service (ECS) instances that are monitored.

TaskName String My availability monitoring task

The name of the availability monitoring task.

TaskOption Struct N/A

The extended options of the availability monitoring task.

HttpKeyword String ok

The response content that is matched in HTTP tests.

HttpMethod String GET

The HTTP request method. Valid values:

  • GET
  • POST
  • HEAD
HttpNegative Boolean true

Specifies whether the specified content is included in the response or not for generating an alert. Valid values:

  • true: An alert is triggered if the specified content is included.
  • false: An alert is triggered if the specified content is excluded.
HttpResponseCharset String UTF-8

The response character set for monitoring availability by sending HTTP requests.

HttpURI String http://www.aliyun.com

The URI that is monitored. This parameter is returned if the TaskType parameter is set to HTTP.

TelnetOrPingHost String ssh.aliyun.com

The domain name or IP address that is monitored.

Note This parameter is returned if the TaskType parameter is set to PING or TELNET.
TaskScope String GROUP

The scope of the instances that are monitored. Valid values:

  • INSTANCE: One or more specific instances are monitored.
  • GROUP: All instances in the application group are monitored.
  • GROUP_SPEC_INSTANCEUP_SPEC_INSTANCE: One or more specific instances in the application group are monitored.
TaskType String HTTP

The method used to monitor the target. Valid values:

  • PING
  • Telnet
  • HTTP
Total Integer 12

The total number of entries returned.

Message String success

The returned message.

Examples

Sample requests

http(s)://[Endpoint]/? Action=DescribeHostAvailabilityList
&<Common request parameters>

Sample success responses

XML format

<DescribeHostAvailabilityListResponse>
   <TaskList>
            <NodeTaskConfig>
                  <GroupName>My application group</GroupName>
                  <TaskOption>
                        <HttpMethod>GET</HttpMethod>
                        <HttpURI>http://www.aliyun.com</HttpURI>
                  </TaskOption>
                  <Disabled>false</Disabled>
                  <Instances>
                        <Instance>i-a2d5q7pm3f123y***</Instance>
                        <Instance>i-a2d5q7pm3f123x***</Instance>
                  </Instances>
                  <Id>123345</Id>
                  <AlertConfig>
                        <EscalationList>
                              <escalationList>
                                    <Value>400</Value>
                                    <MetricName>HttpStatus</MetricName>
                                    <Operator>&gt;</Operator>
                                    <Times>3</Times>
                                    <Aggregate>Value</Aggregate>
                              </escalationList>
                              <escalationList>
                                    <Value>500</Value>
                                    <MetricName>HttpLatency</MetricName>
                                    <Operator>&gt;</Operator>
                                    <Times>3</Times>
                                    <Aggregate>Average</Aggregate>
                              </escalationList>
                        </EscalationList>
                        <SilenceTime>86400</SilenceTime>
                        <NotifyType>1</NotifyType>
                        <EndTime>24</EndTime>
                        <StartTime>0</StartTime>
                  </AlertConfig>
                  <TaskType>HTTP</TaskType>
                  <TaskName>My availability monitoring task</TaskName>
                  <GroupId>12345</GroupId>
                  <TaskScope>GROUP</TaskScope>
            </NodeTaskConfig>
      </TaskList>
      <RequestId>CE26797C-1094-47E6-B651-73AA888F5873</RequestId>
      <Success>true</Success>
      <Code>200</Code>
      <Total>3</Total>
</DescribeHostAvailabilityListResponse>

JSON format

{
    "TaskList": {
        "NodeTaskConfig": [
            {
                "GroupName":"My application group",
                "TaskOption": {
                    "HttpMethod": "GET",
                    "HttpURI": "http://www.aliyun.com"
                },
                "Disabled": false,
                "Instances": {
                    "Instance": [
                        "i-a2d5q7pm3f123y***",
                        "i-a2d5q7pm3f123x***"
                    ]
                },
                "Id": 123345,
                "AlertConfig": {
                    "EscalationList": {
                        "escalationList": [
                            {
                                "Value": "400",
                                "MetricName": "HttpStatus",
                                "Operator": ">",
                                "Times": 3,
                                "Aggregate": "Value"
                            },
                            {
                                "Value": "500",
                                "MetricName": "HttpLatency",
                                "Operator": ">",
                                "Times": 3,
                                "Aggregate": "Average"
                            }
                        ]
                    },
                    "SilenceTime": 86400,
                    "NotifyType": 1,
                    "EndTime": 24,
                    "StartTime": 0
                },
                "TaskType": "HTTP",
                "TaskName":"My availability monitoring task",
                "GroupId": 12345,
                "TaskScope": "GROUP"
            }
        ]
    },
    "RequestId": "CE26797C-1094-47E6-B651-73AA888F5873",
    "Success": true,
    "Code": 200,
    "Total": 3
}

Error codes

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