Queries the details of a site monitoring task.
Operation description
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 URL that is monitored by the task is https://aliyun.com
, and the name of the carrier is Alibaba
.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
cms:DescribeSiteMonitorAttribute | get |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
TaskId | string | Yes | The ID of the site monitoring task. | cc641dff-c19d-45f3-ad0a-818a0c4f**** |
IncludeAlert | boolean | No | Specifies whether to return the information of the alert rules that are configured for the site monitoring task. Valid values:
| false |
For more information about common request parameters, see Common parameters.
Response parameters
Examples
Sample success responses
JSON
format
{
"Code": "200",
"Message": "successful",
"MetricRules": {
"MetricRule": [
{
"ActionEnable": "true",
"AlarmActions": "CloudMonitor",
"ComparisonOperator": "GreaterThanYesterday",
"Dimensions": "[{\"taskId\": \"cc641dff-c19d-45f3-ad0a-818a0c4f****\" }]",
"EvaluationCount": "3",
"Expression": "$Availability=30",
"Level": "2",
"MetricName": "Availability",
"Namespace": "acs_networkmonitor",
"OkActions": "[ \"CloudMonitor\"]",
"Period": "15s",
"RuleId": "bf071ae_7b7aec3817b0fdf****",
"RuleName": "rule1",
"StateValue": "OK",
"Statistics": "Availability",
"Threshold": "30"
}
]
},
"RequestId": "D17DF650-7EBD-54D0-903A-1D4E624D7402",
"SiteMonitors": {
"Address": "https://aliyun.com",
"AgentGroup": "PC",
"CustomSchedule": {
"days": {
"days": [
1
]
},
"end_hour": 18,
"start_hour": 8,
"time_zone": "local"
},
"Interval": "1",
"IspCities": {
"IspCity": [
{
"City": "738",
"CityName": "",
"Isp": "465",
"IspName": "",
"Type": "IDC"
}
]
},
"OptionJson": {
"assertions": {
"assertions": [
{
"operator": "lessThan",
"property": "json path",
"target": "0",
"type": "response_time"
}
]
},
"attempts": 3,
"authentication": 1,
"blocked_url_list": {
"blocked_url_list": [
"www.taobao.com/**"
]
},
"browser_headers": {
"browser_headers": [
{
"key": "value"
}
]
},
"browser_hosts": {
"browser_hosts": [
"{\"url\":\"www.taobao.com\",\"ip\":\"127.0.0.1\"}"
]
},
"browser_info": {
"browser_info": [
{
"browser": "Chrome",
"device": "laptop"
}
]
},
"browser_insecure": false,
"browser_task_version": "1",
"cookie": "lang=en",
"diagnosis_mtr": false,
"diagnosis_ping": false,
"dns_hijack_whitelist": "www.taobao.com:www.taobao.com.danuoyi.tbcache.com",
"dns_match_rule": "IN_DNS",
"dns_server": "192.168.XX.XX",
"dns_type": "A",
"empty_message": false,
"expect_exist_string": {
"expect_exist_string": [
"expected string"
]
},
"expect_non_exist_string": {
"expect_non_exist_string": [
"unexpected string"
]
},
"expect_value": "dns_server",
"failure_rate": 0.4,
"header": "testKey:testValue",
"http_method": "get",
"ip_network": "v4",
"isBase64Encode": "true",
"match_rule": 1,
"min_tls_version": "tlsv1.2",
"password": "123****",
"ping_num": 29,
"ping_port": 80,
"ping_type": "icmp,tcp,udp",
"port": 110,
"protocol": "TCP",
"quic_enabled": "true",
"quic_target": {
"quic_target": [
"www.taobao.com"
]
},
"request_content": "aa=bb",
"request_format": "txt",
"response_content": "txt",
"response_format": "txt",
"retry_delay": 0,
"screen_shot": false,
"strict_mode": false,
"time_out": 3,
"traffic_hijack_element_blacklist": {
"traffic_hijack_element_blacklist": [
"www.taobao.com"
]
},
"traffic_hijack_element_count": 0,
"traffic_hijack_element_whitelist": {
"traffic_hijack_element_whitelist": [
"www.taobao.com"
]
},
"username": "testUser",
"waitTime_after_completion": 3
},
"TaskId": "cc641dff-c19d-45f3-ad0a-818a0c4f****",
"TaskName": "test123",
"TaskState": "1",
"TaskType": "HTTP",
"VpcConfig": {
"Region": "cn-beijing",
"SecurityGroupId": "sg-xxxxxx",
"VpcId": "vpc-xxxxxx",
"VswitchId": "vsw-xxxxxx"
}
},
"Success": true
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | ParameterInvalid | The parameter is missing or invalid. %s | - |
401 | AccessDeniedException | You donot have sufficient access to perform this action. | - |
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 |
404 | Forbidden | Task Id does not exist | - |
406 | ExceedingQuota | Exceeding quota limits. | - |
429 | Throttli∂ngException | The request was denied due to request throttling. | - |
500 | InternalError | The request processing has failed due to some unknown error. | - |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-08-05 | The Error code has changed. The response structure of the API has changed | View Change Details |
2024-07-31 | The Error code has changed. The response structure of the API has changed | View Change Details |
2024-05-16 | The Error code has changed. The response structure of the API has changed | View Change Details |
2024-05-16 | The Error code has changed. The response structure of the API has changed | View Change Details |
2023-09-04 | The Error code has changed. The response structure of the API has changed | View Change Details |
2023-08-22 | The Error code has changed. The response structure of the API has changed | View Change Details |
2023-08-04 | The Error code has changed. The response structure of the API has changed | View Change Details |
2023-06-15 | The Error code has changed. The response structure of the API has changed | View Change Details |
2023-05-22 | The Error code has changed. The response structure of the API has changed | View Change Details |
2023-04-06 | The Error code has changed. The response structure of the API has changed | View Change Details |
2021-09-16 | API Description Update. The Error code has changed. The response structure of the API has changed | View Change Details |