Queries the list of site monitoring tasks by calling the DescribeSiteMonitorList operation.
Operation description
This topic provides an example of how to query the list of site monitoring tasks for the current account. The response shows that the current account has one site monitoring record named HanZhou_ECS2.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cms:DescribeSiteMonitorList |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| TaskId |
string |
No |
The ID of the site monitoring task. |
a1ecd34a-8157-44d9-b060-14950837**** |
| TaskType |
string |
No |
The type of the site monitoring task. CloudMonitor supports the following types: HTTP, PING, TCP, UDP, DNS, SMTP, POP3, and FTP. |
HTTP |
| Keyword |
string |
No |
The keyword used to search for site monitoring tasks. Note
Fuzzy match is supported based on the task name or task address. |
site |
| Page |
integer |
No |
The page number. Default value: 1. |
1 |
| PageSize |
integer |
No |
The number of entries per page. Default value: 10. |
10 |
| TaskState |
string |
No |
The task status. Valid values:
|
1 |
| AgentGroup |
string |
No |
The type of monitoring nodes used by the task. Valid values:
Valid values:
|
PC |
For more information about common request parameters, see Common parameters.
Response elements
|
Element |
Type |
Description |
Example |
|
object |
None. |
||
| RequestId |
string |
The request ID. |
A80DB41C-AF6C-50E1-ADB5-66DCBA3D266B |
| Success |
string |
Indicates whether the operation was successful. Valid values:
|
true |
| Code |
string |
The status code. Note
200 indicates success. |
200 |
| Message |
string |
The returned message. |
successful |
| PageNumber |
integer |
The page number. |
1 |
| PageSize |
integer |
The number of entries per page. |
10 |
| TotalCount |
integer |
The total number of entries. |
1 |
| SiteMonitors |
object |
||
| SiteMonitor |
array<object> |
The list of site monitoring tasks. |
|
|
array<object> |
None. |
||
| TaskType |
string |
The type of the site monitoring task. CloudMonitor supports the following types: HTTP, PING, TCP, UDP, DNS, SMTP, POP3, and FTP. |
TCP |
| UpdateTime |
string |
The time when the site monitoring task was last updated, in the format of YYYY-MM-DD HH:mm:ss. |
2022-03-08 17:14:31 |
| Interval |
string |
The monitoring interval. Unit: minutes. |
1 |
| TaskState |
string |
The task status. Valid values:
|
1 |
| CreateTime |
string |
The time when the task was created, in the format of YYYY-MM-DD HH:mm:ss. |
2021-11-01 11:05:18 |
| TaskName |
string |
The name of the site monitoring task. |
New monitoring task |
| Address |
string |
The URL or IP address monitored by the task. |
https://aliyun.com |
| TaskId |
string |
The ID of the site monitoring task. |
f5783760-1b39-4b6b-80e8-453d962a**** |
| OptionsJson |
object |
The extended options. Each monitoring type has different extended options. For more information, see CreateSiteMonitor. |
|
| password |
string |
The password for the SMTP, POP3, or FTP monitoring type. |
123**** |
| request_format |
string |
The format of the HTTP request content. Valid values:
|
hex |
| response_content |
string |
The matched response content.
|
cf0f85 |
| failure_rate |
number |
The packet loss rate. Note
This parameter applies only to the PING monitoring type. |
0.5 |
| time_out |
integer |
The timeout period. Unit: milliseconds. |
3000 |
| header |
string |
The HTTP request header. The format is |
testKey:testValue |
| cookie |
string |
The cookie text for the HTTP request. |
lang=en |
| port |
integer |
The port for the TCP, UDP, SMTP, or POP3 monitoring type. |
80 |
| ping_num |
integer |
The number of PING attempts. |
20 |
| authentication |
integer |
Specifies whether to enable security authentication. Valid values:
|
1 |
| http_method |
string |
The HTTP request method. Valid values:
|
get |
| match_rule |
integer |
Specifies whether alert rules are included. Valid values:
|
0 |
| dns_match_rule |
string |
The DNS matching rule. Valid values:
|
IN_DNS |
| request_content |
string |
The HTTP request content. |
cf0f85 |
| username |
string |
The username for FTP, SMTP, or POP3. |
testUser |
| response_format |
string |
The format of the HTTP response content. Valid values:
|
hex |
| dns_type |
string |
The DNS resolution type. This parameter applies only to the DNS monitoring type. Valid values:
|
A |
| dns_server |
string |
The domain name or IP address of the specified DNS server. |
192.168.XX.XX |
| enable_operator_dns |
boolean |
Specifies whether to use the carrier DNS. Valid values:
|
true |
| attempts |
integer |
The number of retries after a DNS failure. |
3 |
| protocol |
string |
The DNS protocol type. Valid values:
|
udp |
| proxy_protocol |
boolean |
Specifies whether to enable ProxyProtocol. Valid values:
|
false |
| acceptable_response_code |
string |
The acceptable status codes. Note
Use assertion configurations instead. |
400 |
| isBase64Encode |
string |
Specifies whether to decode and store the password using Base64. Valid values:
|
false |
| cert_verify |
boolean |
Specifies whether to verify the certificate. Valid values:
|
false |
| unfollow_redirect |
boolean |
Specifies whether to follow redirects when a 301 or 302 status code is returned. Valid values:
|
false |
| diagnosis_mtr |
boolean |
Specifies whether to enable automatic MTR network diagnostics after a task failure. Valid values:
|
false |
| diagnosis_ping |
boolean |
Specifies whether to enable automatic Ping network latency detection after a monitoring task failure. Valid values:
|
false |
| retry_delay |
integer |
The number of retries after a monitoring failure. |
1 |
| assertions |
object |
||
| assertions |
array<object> |
The assertion configuration group. |
|
|
object |
The assertion configuration group. |
||
| property |
string |
The parsing path for the assertion content.
|
json path |
| type |
string |
The assertion type. Valid values:
|
response_time |
| operator |
string |
The assertion comparison operator. Valid values:
|
lessThan |
| target |
string |
The target value or string for assertion comparison. |
1000 |
| AgentGroup |
string |
The probe type. Valid values:
|
PC |
Examples
Success response
JSON format
{
"RequestId": "A80DB41C-AF6C-50E1-ADB5-66DCBA3D266B",
"Success": "true",
"Code": "200",
"Message": "successful",
"PageNumber": 1,
"PageSize": 10,
"TotalCount": 1,
"SiteMonitors": {
"SiteMonitor": [
{
"TaskType": "TCP",
"UpdateTime": "2022-03-08 17:14:31",
"Interval": "1",
"TaskState": "1",
"CreateTime": "2021-11-01 11:05:18",
"TaskName": "新的探测任务",
"Address": "https://aliyun.com",
"TaskId": "f5783760-1b39-4b6b-80e8-453d962a****",
"OptionsJson": {
"password": "123****",
"request_format": "hex",
"response_content": "cf0f85",
"failure_rate": 0.5,
"time_out": 3000,
"header": "testKey:testValue",
"cookie": "lang=en",
"port": 80,
"ping_num": 20,
"authentication": 1,
"http_method": "get",
"match_rule": 0,
"dns_match_rule": "IN_DNS",
"request_content": "cf0f85",
"username": "testUser",
"response_format": "hex",
"dns_type": "A",
"dns_server": "192.168.XX.XX",
"enable_operator_dns": true,
"attempts": 3,
"protocol": "udp",
"proxy_protocol": false,
"acceptable_response_code": "400",
"isBase64Encode": "false",
"cert_verify": false,
"unfollow_redirect": false,
"diagnosis_mtr": false,
"diagnosis_ping": false,
"retry_delay": 1,
"assertions": {
"assertions": [
{
"property": "json path",
"type": "response_time",
"operator": "lessThan",
"target": "1000"
}
]
}
},
"AgentGroup": "PC"
}
]
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidQueryParameter | %s | |
| 401 | AccessDeniedException | You donot have sufficient access to perform this action. | |
| 500 | %s | %s | |
| 500 | InternalError | %s | |
| 402 | LimitExceeded | The quota for this customer had been reached. | |
| 403 | Forbidden | You are not authorized to operate the specified resource. | No permission, please use RAM to authorize |
| 503 | %s | %s | |
| 406 | ExceedingQuota | Exceeding quota limits. | The number of tasks exceeds the limit |
| 429 | ThrottlingException | The request was denied due to request throttling. | |
| 409 | %s | %s |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.