Queries the details about a site monitoring task.

This topic describes shows how to query the details about the 6eafb10e-e0b6-41b3-98ea-89131c12**** site monitoring task. The result includes the details about the site monitoring task, for example, the name (test123), monitored address (https://aliyun.com), and carrier (Alibaba).

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 DescribeSiteMonitorAttribute

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

TaskId String Yes 6eafb10e-e0b6-41b3-98ea-89131c12****

The ID of the monitoring task.

IncludeAlert Boolean No false

Specifies whether to return the information about the alert rules that are configured for the site monitoring task.

  • true: to include the information about the alert rules in the response.
  • false: to exclude the information about the alert rules in the response.

For more information about common request parameters, see Common parameters.

Response parameters

Parameter Type Example Description
RequestId String 9ed350c5-d579-4ba1-9c5d-dda70cd8422c

The ID of the request.

Code String 200

The HTTP status code.

Note The HTTP status code 200 indicates that the request succeeds.
Success Boolean true

Indicates whether the call succeeds. Valid values:

  • true: The call succeeds.
  • false: The call fails.
SiteMonitors Struct

The details about the site monitoring task.

Address String https://aliyun.com

The monitored address.

Interval String 1

The interval at which the site monitoring task is executed. Unit: minutes. Valid values: 1, 5, and 15.

IspCities Array of IspCity

The information about detection points. The information includes the carriers that provide the detection points and cities where the detection points reside.

IspCity
City String 546

The ID of the city.

CityName String Hangzhou

The name of the city.

Isp String 465

The ID of the carrier.

IspName String Alibaba

The name of the carrier.

OptionJson Struct

The extended options of the protocol that is used by the site monitoring task. The options vary based on the protocol. For more information, see CreateSiteMonitor.

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 192.168.XX.XX

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: The record indicates an IP address of the specified host name or domain name. Default value: A.
  • CNAME: The record maps multiple domain names to a domain name.
  • NS: The record indicates a DNS server that is used to parse domain names.
  • MX: The record that links domain names to the address of a mail server.
  • TXT: The record 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 against spam.
expect_value String dns_server

The domain name or alias to be parsed.

Note If the TaskType parameter is set to DNS, this parameter is available.
failure_rate Float 0.4

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 1

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 29

The heartbeat of the PING protocol.

port Integer 110

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 txt

The response to the HTTP request.

response_format String txt

The format of the response. Valid values:

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

The timeout period. Unit: milliseconds.

username String testUser

The username of the FTP, SMTP, or POP3 protocol.

TaskId String 6eafb10e-e0b6-41b3-98ea-89131c12****

The ID of the site monitoring task.

TaskName String test123

The name of the site monitoring task.

TaskState String OK

The status of the site monitoring task.

TaskType String HTTP

The type of the site monitoring task. Valid values: HTTP, HTTPS, PING, TCP, UDP, DNS, SMTP, POP3, and FTP.

MetricRules Array of MetricRule

The information about alert rules that are configured for the site monitoring task.

MetricRule
ActionEnable String true

The status of the alert rule.

AlarmActions String ["Send alert notifications to the alert contact group"]

The alert contact group to which alert notifications are sent.

ComparisonOperator String >

The comparison operator.

Dimensions String [ { "taskId": "49f7b317-7645-4cc9-94fd-ea42e522****" } ]

The dimension of the alert rule.

EvaluationCount String 3

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

Expression String $Availability>90

The expression that is used to trigger the alert rule.

Level String 3

The severity of the alert. Valid values:

  • 1: critical
  • 2: warning
  • 3: information
MetricName String Availability

The name of the metric.

Namespace String acs_networkmonitor

The namespace of the service.

Specify the value in the format of acs_Service name.

OkActions String ["Alice"]

The alert groups to which alert notifications are sent.

Period String 60

The time interval at which metric data was queried. The value is the same as the interval at which metric data is reported. Unit: seconds.

Note If a statistical period was specified for the alert rule, raw data will be queried based on the statistical period.
RuleId String 49f7b317-7645-4cc1-94fd-ea42e522****

The ID of the alert rule.

RuleName String ECS_test

The name of the alert rule.

StateValue String OK

The status of the alert rule. Valid values:

  • OK: No active alerts are triggered.
  • ALARM: At least one alert is triggered.
Statistics String Availability

The statistical method of the alert rule.

Threshold String 90

The alert threshold.

Message String successful

The returned information.

Examples

Sample requests

http(s)://[Endpoint]/?Action=DescribeSiteMonitorAttribute
&TaskId=6eafb10e-e0b6-41b3-98ea-89131c12****
&<Common request parameters>

Sample success responses

XML format

<DescribeSiteMonitorAttributeResponse>
	  <Message>successful</Message>
	  <RequestId>DD7AED9A-06E2-49D7-9DEA-12DC32FBE34B</RequestId>
	  <Code>200</Code>
	  <Success>true</Success>
	  <SiteMonitors>
		    <OptionJson>
			      <time_out>30000</time_out>
			      <http_method>get</http_method>
			      <match_rule>0</match_rule>
		    </OptionJson>
		    <TaskId>6eafb10e-e0b6-41b3-98ea-89131c12****</TaskId>
		    <Address>https://aliyun.com</Address>
		    <TaskName>test123</TaskName>
		    <TaskType>HTTP</TaskType>
		    <IspCities>
			      <IspCity>
				        <IspName>Alibaba</IspName>
				        <Isp>465</Isp>
				        <NameZh>Shanghai</NameZh>
				        <City>357</City>
			      </IspCity>
			      <IspCity>
				        <IspName>Alibaba</IspName>
				        <Isp>465</Isp>
				        <CityName>Shenzhen</CityName>
				        <City>304</City>
			      </IspCity>
			      <IspCity>
				        <IspName>Alibaba</IspName>
				        <Isp>465</Isp>
				        <CityName>Zhangjiakou</CityName>
				        <City>503</City>
			      </IspCity>
		    </IspCities>
		    <TaskState>1</TaskState>
		    <Interval>1</Interval>
	  </SiteMonitors>
</DescribeSiteMonitorAttributeResponse>

JSON format

{"MetricRules":{"MetricRule":[{"ComparisonOperator":">","RuleId":"49f7b317-7645-4cc1-94fd-ea42e522****","Dimensions":"[ {  \"taskId\": \"49f7b317-7645-4cc9-94fd-ea42e522****\" } ]","EvaluationCount":"3","Period":"60","Statistics":"Availability","Namespace":"acs_networkmonitor","AlarmActions":"[\"Send alert notifications to the alert contact group\"]","MetricName":"Availability","Expression":"$Availability>90","OkActions":"[\"Alice\"]","ActionEnable":"true","StateValue":"OK","Level":"3","RuleName":"ECS_test","Threshold":"90"}]},"RequestId":"9ed350c5-d579-4ba1-9c5d-dda70cd8422c","Message":"successful","Code":"200","Success":"true","SiteMonitors":{"TaskId":"6eafb10e-e0b6-41b3-98ea-89131c12****","Address":"https://aliyun.com","TaskName":"test123","TaskType":"HTTP","TaskState":"OK","Interval":"1","IspCities":{"IspCity":[{"IspName":"Alibaba","Isp":"465","City":"546","CityName":"Hangzhou"}]},"OptionJson":{"dns_type":"A","cookie":"lang=en","ping_num":"29","dns_server":"192.168.XX.XX","time_out":"3","expect_value":"dns_server","response_content":"txt","failure_rate":"0.4","password":"123****","response_format":"txt","request_format":"txt","http_method":"get","request_content":"aa=bb","port":"110","header":"testKey:testValue","match_rule":"1","authentication":"1","username":"testUser"}}}

Error codes

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