Queries site monitoring tasks.
This topic provides an example on how to query all the site monitoring tasks of your
Alibaba Cloud account. In this example, the returned result indicates that the Alibaba
Cloud account has one site monitoring task named HanZhou_ECS2
.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | DescribeSiteMonitorList |
The operation that you want to perform. Set the value to DescribeSiteMonitorList. |
TaskId | String | No | a1ecd34a-8157-44d9-b060-14950837**** |
The ID of the site monitoring task. |
TaskType | String | No | HTTP |
The protocol that is used by the site monitoring task. Valid values: HTTP, PING, TCP, UDP, DNS, SMTP, POP3, and FTP. |
Keyword | String | No | site |
The keyword to be matched. Note You can search for tasks by name or address. Fuzzy search is supported.
|
Page | Integer | No | 1 |
The number of the page to return. Default value: 1. |
PageSize | Integer | No | 10 |
The number of entries to return on each page. Default value: 10. |
For more information about common request parameters, see Common parameters.
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
Code | String | 200 |
The HTTP status code. Note The status code 200 indicates that the call was successful.
|
Message | String | successful |
The returned message. |
PageNumber | Integer | 1 |
The page number of the returned page. |
PageSize | Integer | 10 |
The number of entries returned per page. |
RequestId | String | C60B8269-9B1C-4C32-8BCC-947D03B09274 |
The ID of the request. |
SiteMonitors | Array of SiteMonitor |
The site monitoring tasks that are returned. |
|
SiteMonitor | |||
Address | String | https://aliyun.com |
The URL or IP address that is monitored by the site monitoring task. |
CreateTime | String | 2020-11-06 10:20:09 |
The time when the site monitoring task was created. |
Interval | String | 1 |
The interval at which detection requests are sent. Unit: minutes. |
OptionsJson | Struct |
The extended options of the site monitoring task. The options vary based on the specified protocol. For more information, see CreateSiteMonitor. |
|
attempts | Long | 3 |
The number of retries after a DNS failure occurred. |
authentication | Integer | 1 |
Indicates whether the security authentication feature is enabled. Valid values:
|
cookie | String | lang=en |
The cookie of the HTTP request. |
dns_match_rule | String | IN_DNS |
The relationship between the list of aliases or IP addresses that are expected and the list of DNS results. Valid values:
|
dns_server | String | 192.168.XX.XX |
The domain name or IP address of the DNS server. Note This parameter is returned only if the TaskType parameter is set to DNS.
|
dns_type | String | A |
The type of the DNS record. This parameter is returned only if the TaskType parameter is set to DNS. Valid values:
|
failure_rate | Float | 0.5 |
The packet loss rate. Note This parameter is returned only if the TaskType parameter is set to PING.
|
header | String | testKey:testValue |
The HTTP request header. An HTTP header is a key-value pair in which the key and the
value are separated by a colon (:). The format is |
http_method | String | get |
The HTTP request method. Valid values:
|
match_rule | Integer | 0 |
Indicates whether the alert rule is included. Valid values:
|
password | String | 123**** |
The password of the SMTP, POP3, or FTP protocol. |
ping_num | Integer | 20 |
The number of hops for the PING protocol. |
port | Integer | 8080 |
The port number of the TCP, UDP, SMTP, or POP3 protocol. |
protocol | String | TCP |
The protocol that is used to send the request. |
request_content | String | cf0f85 |
The content of the HTTP request. |
request_format | String | hex |
The format of the HTTP request. Valid values:
|
response_content | String | cf0f85 |
The response to the HTTP request.
|
response_format | String | hex |
The format of the response. Valid values:
|
time_out | Long | 3000 |
The timeout period. Unit: milliseconds. |
username | String | testUser |
The username of the FTP, SMTP, or POP3 protocol. |
TaskId | String | a1ecd34a-8127-44d9-b060-14950837**** |
The ID of the site monitoring task. |
TaskName | String | New site monitoring task |
The name of the site monitoring task. |
TaskState | String | 1 |
The status of the site monitoring task. Valid values:
|
TaskType | String | HTTP |
The protocol that is used by the site monitoring task. Valid values: HTTP, PING, TCP, UDP, DNS, SMTP, POP3, and FTP. |
UpdateTime | String | 2020-11-06 13:44:40 |
The time when the site monitoring task was updated. |
Success | String | true |
Indicates whether the call was successful. Valid values:
|
TotalCount | Integer | 1 |
The total number of returned entries. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=DescribeSiteMonitorList
&<Common request parameters>
Sample success responses
XML
format
<DescribeSiteMonitorListResponse>
<TotalCount>1</TotalCount>
<Message>successful</Message>
<RequestId>C60B8269-9B1C-4C32-8BCC-947D03B09274</RequestId>
<PageSize>10</PageSize>
<PageNumber>1</PageNumber>
<Code>200</Code>
<Success>true</Success>
<SiteMonitors>
<SiteMonitor>
<TaskId>2c8dbdf9-a3ab-46a1-85a4-f094965e****</TaskId>
<Address>https://www.aliyun.com</Address>
<TaskName>HanZhou_ECS2</TaskName>
<OptionsJson>
<http_method>get</http_method>
<time_out>30000</time_out>
</OptionsJson>
<TaskType>HTTP</TaskType>
<CreateTime>2020-11-06 10:20:09</CreateTime>
<UpdateTime>2020-11-06 13:44:40</UpdateTime>
<TaskState>1</TaskState>
<Interval>1</Interval>
</SiteMonitor>
</SiteMonitors>
</DescribeSiteMonitorListResponse>
JSON
format
{
"TotalCount": 1,
"Message": "successful",
"RequestId": "C60B8269-9B1C-4C32-8BCC-947D03B09274",
"PageSize": 10,
"PageNumber": 1,
"Code": "200",
"Success": true,
"SiteMonitors": {
"SiteMonitor": [
{
"TaskId": "2c8dbdf9-a3ab-46a1-85a4-f094965e****",
"Address": "https://www.aliyun.com",
"TaskName": "HanZhou_ECS2",
"OptionsJson": {
"http_method": "get",
"time_out": 30000
},
"TaskType": "HTTP",
"CreateTime": "2020-11-06 10:20:09",
"UpdateTime": "2020-11-06 13:44:40",
"TaskState": 1,
"Interval": 1
}
]
}
}
Error codes
For a list of error codes, visit the API Error Center.