Queries site monitoring tasks.

This topic describes how to query the site monitoring tasks of the current account. In this example, the result indicates that the account has one site monitoring task named HanZhou_ECS2.

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 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 HTTP status code 200 indicates that the call succeeds.
Message String successful

The returned information.

PageNumber Integer 1

The page number of the returned page.

PageSize Integer 10

The number of entries returned per page.

RequestId String 68192f5d-0d45-4b98-9724-892813f86c71

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-04 15:23:09

The time when the site monitoring task is 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 the description of the CreateSiteMonitor operation.

authentication Integer 1

Indicates whether the security authentication feature is enabled. Valid values:

  • 0: The feature is disabled.
  • 1: The feature is enabled.
cookie String lang=en

The cookie of the HTTP request.

dns_server String 8.8.8.8

The IP address of the DNS server.

Note If the TaskType parameter is set to DNS, this parameter is available.
dns_type String A

The type of the DNS record. If the TaskType parameter is set to DNS, this parameter is available. Valid values:

  • A: a record that specifies an IP address that is related to the specified host name or domain name. Default value: A.
  • CNAME: a record that maps multiple domain names to a domain name.
  • NS: a record that specifies a DNS server that is used to parse domain names.
  • MX: a record that links domain names to the address of a mail server.
  • TXT: a record that stores the text information of host name or domain names. The text must be 1 to 512 bytes in length. The TXT record serves as a Sender Policy Framework (SPF) record to fight against spam.
failure_rate Float 0.5

The packet loss rate.

Note If the TaskType parameter is set to PING, this parameter is available.
header String testKey:testValue

The header of the HTTP request.

http_method String get

The HTTP request method. Valid values:

  • get
  • post
  • head
match_rule Integer 0

Indicates whether the alert rule is included. Valid values:

  • 0: The alert rule is included.
  • 1: The alert rule is excluded.
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.

request_content String aa=bb

The request body of the HTTP protocol.

request_format String txt

The format of the HTTP request. Valid values:

  • hex: hexadecimal.
  • txt: text.
response_content String user

The response to the HTTP request.

response_format String txt

The format of the response. Valid values:

  • hex: hexadecimal.
  • txt: text.
time_out Long 5000

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 task. Valid values:

  • 1: The task is normal.
  • 0: The task is disabled.
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 2019-03-03 14:16:34

The time when the site monitoring task is updated.

Success String true

Indicates whether the call succeeds. Valid values:

  • true: The call succeeds.
  • false: The call fails.
TotalCount Integer 10

The total number of entries that are returned.

Examples

Sample requests

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

Sample success responses

XML format

<DescribeSiteMonitorListResponse>
	  <TotalCount>4</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": 4,
	"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.