Queries the details of a site monitoring task.
This topic provides an example on how to query the details of a site monitoring task
whose ID is cc641dff-c19d-45f3-ad0a-818a0c4f****
. The returned result indicates that the task name is test123
, the address that is monitored by the task is https://aliyun.com
, and the name of the carrier is Alibaba
.
Debugging
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 | cc641dff-c19d-45f3-ad0a-818a0c4f**** |
The ID of the site monitoring task. |
IncludeAlert | Boolean | No | false |
Specifies whether to return the information of the alert rules that are configured for the site monitoring task. Valid values:
|
For more information about common request parameters, see Common parameters.
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | D17DF650-7EBD-54D0-903A-1D4E624D7402 |
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. Valid values:
|
SiteMonitors | Struct |
The details of the site monitoring task. |
|
Address | String | https://aliyun.com |
The address that is monitored by the site monitoring task. |
Interval | String | 1 |
The interval at which the site monitoring task is executed. Unit: minutes. Valid values: 1, 5, 15, 30, and 60. |
IspCities | Array of IspCity |
The information of detection points. The information includes the carriers that provide the detection points and the cities where the detection points reside. |
|
IspCity | |||
City | String | 738 |
The ID of the city. |
CityName | String | Beijing |
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 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 expected aliases or IP addresses and the list of DNS results. Valid values:
|
dns_server | String | 192.168.XX.XX |
The 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:
|
expect_value | String | dns_server |
The domain name or alias to be parsed. Note This parameter is returned only if the TaskType parameter is set to DNS.
|
failure_rate | Float | 0.4 |
The packet loss rate. Note This parameter is returned only if the TaskType parameter is set to PING.
|
header | String | testKey:testValue |
The header of the HTTP request. |
http_method | String | get |
The HTTP request method. Valid values:
|
isBase64Encode | String | true |
Indicates whether the value of the
|
match_rule | Integer | 1 |
Indicates whether the alert rule is included. Valid values:
|
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. |
protocol | String | TCP |
The protocol that is used to send the request. |
request_content | String | aa=bb |
The content of the HTTP request. |
request_format | String | txt |
The format of the HTTP request. Valid values:
|
response_content | String | txt |
The response to the HTTP request. |
response_format | String | txt |
The format of the response. Valid values:
|
time_out | Long | 3 |
The timeout period. Unit: milliseconds. |
username | String | testUser |
The username of the FTP, SMTP, or POP3 protocol. |
TaskId | String | cc641dff-c19d-45f3-ad0a-818a0c4f**** |
The ID of the site monitoring task. |
TaskName | String | test123 |
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, HTTPS, PING, TCP, UDP, DNS, SMTP, POP3, and FTP. |
MetricRules | Array of MetricRule |
The information of the alert rules that are configured for the site monitoring task. |
|
MetricRule | |||
ActionEnable | String | true |
Indicates whether the alert rule is enabled. Valid values:
|
AlarmActions | String | CloudMonitor |
The alert contact group to which alert notifications are sent. |
ComparisonOperator | String | GreaterThanYesterday |
The comparison operator that is used in the alert rule. Valid values:
|
Dimensions | String | [{"taskId": "cc641dff-c19d-45f3-ad0a-818a0c4f****" }] |
The dimension of the alert rule. |
EvaluationCount | String | 3 |
The consecutive number of times for which the metric value is measured before an alert is triggered. |
Expression | String | $Availability=30 |
The expression that is used to trigger alerts. |
Level | String | 2 |
The severity of the alert. Valid values:
|
MetricName | String | Availability |
The name of the metric. |
Namespace | String | acs_networkmonitor |
The namespace of the cloud service. |
OkActions | String | [ "CloudMonitor"] |
The alert contact groups to which alert notifications are sent. |
Period | String | 15s |
The interval at which the monitoring data is queried. The value is the same as the interval at which metric data is reported. Unit: seconds. Note If you specify a statistical period for the alert rule, raw data is queried based
on the statistical period.
|
RuleId | String | bf071ae_7b7aec3817b0fdf**** |
The ID of the alert rule. |
RuleName | String | rule1 |
The name of the alert rule. |
StateValue | String | OK |
The status of the alert. Valid values:
|
Statistics | String | Availability |
The statistical method of the alert rule. Valid values:
|
Threshold | String | 30 |
The alert threshold. |
Message | String | successful |
The returned message. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=DescribeSiteMonitorAttribute
&TaskId=cc641dff-c19d-45f3-ad0a-818a0c4f****
&<Common request parameters>
Sample success responses
XML
format
<DescribeSiteMonitorAttributeResponse>
<MetricRules>
<MetricRule>
<ComparisonOperator>GreaterThanYesterday</ComparisonOperator>
<RuleId>bf071ae_7b7aec3817b0fdf****</RuleId>
<Period>15s</Period>
<EvaluationCount>3</EvaluationCount>
<Dimensions>
<taskId>cc641dff-c19d-45f3-ad0a-818a0c4f****</taskId>
</Dimensions>
<Statistics>Availability</Statistics>
<Namespace>acs_networkmonitor</Namespace>
<AlarmActions>CloudMonitor</AlarmActions>
<MetricName>Availability</MetricName>
<OkActions>CloudMonitor</OkActions>
<Expression>$Availability=30</Expression>
<ActionEnable>true</ActionEnable>
<StateValue>OK</StateValue>
<Level>2</Level>
<RuleName>rule1</RuleName>
<Threshold>30</Threshold>
</MetricRule>
</MetricRules>
<Message>successful</Message>
<RequestId>D17DF650-7EBD-54D0-903A-1D4E624D7402</RequestId>
<Code>200</Code>
<Success>true</Success>
<SiteMonitors>
<OptionJson>
<time_out>30000</time_out>
<http_method>get</http_method>
</OptionJson>
<TaskId>cc641dff-c19d-45f3-ad0a-818a0c4f****</TaskId>
<Address>https://aliyun.com</Address>
<TaskName>test123</TaskName>
<TaskType>HTTP</TaskType>
<IspCities>
<IspCity>
<IspName>Alibaba</IspName>
<Isp>465</Isp>
<CityName>Beijing</CityName>
<City>738</City>
</IspCity>
</IspCities>
<TaskState>1</TaskState>
<Interval>1</Interval>
</SiteMonitors>
</DescribeSiteMonitorAttributeResponse>
JSON
format
{
"MetricRules": {
"MetricRule": [
{
"ComparisonOperator": "GreaterThanYesterday",
"RuleId": "bf071ae_7b7aec3817b0fdf****",
"Period": "15s",
"EvaluationCount": 3,
"Dimensions": [
{
"taskId": "cc641dff-c19d-45f3-ad0a-818a0c4f****"
}
],
"Statistics": "Availability",
"Namespace": "acs_networkmonitor",
"AlarmActions": [
"CloudMonitor"
],
"MetricName": "Availability",
"OkActions": [
"CloudMonitor"
],
"Expression": "$Availability=30",
"ActionEnable": true,
"StateValue": "OK",
"Level": 2,
"RuleName": "rule1",
"Threshold": "30"
}
]
},
"Message": "successful",
"RequestId": "D17DF650-7EBD-54D0-903A-1D4E624D7402",
"Code": "200",
"Success": true,
"SiteMonitors": {
"OptionJson": {
"time_out": 30000,
"http_method": "get"
},
"TaskId": "cc641dff-c19d-45f3-ad0a-818a0c4f****",
"Address": "https://aliyun.com",
"TaskName": "test123",
"TaskType": "HTTP",
"IspCities": {
"IspCity": [
{
"IspName": "Alibaba",
"Isp": "465",
"CityName": "Beijing",
"City": "738"
}
]
},
"TaskState": 1,
"Interval": 1
}
}
Error codes
For a list of error codes, visit the API Error Center.