You can call the DescribeSiteMonitorAttribute operation to query the details of a site monitoring task.
Operation description
This topic provides an example of how to query the details of the site monitoring task with the ID cc641dff-c19d-45f3-ad0a-818a0c4f****. The response indicates that the task name is test123, the detection address is https://aliyun.com, and the carrier is Alibaba.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cms:DescribeSiteMonitorAttribute |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| TaskId |
string |
Yes |
The ID of the monitoring task. |
cc641dff-c19d-45f3-ad0a-818a0c4f**** |
| IncludeAlert |
boolean |
No |
Specifies whether to include alert rules in the returned task details.
|
false |
For more information about common request parameters, see Common parameters.
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response. |
||
| Code |
string |
The status code. Note
A status code of 200 indicates a success. |
200 |
| Message |
string |
The returned message. |
successful |
| MetricRules |
object |
||
| MetricRule |
array<object> |
The alert rules for the monitoring task. |
|
|
object |
The alert rules for the monitoring task. |
||
| ActionEnable |
string |
The status of the alert rule. Valid values:
|
true |
| AlarmActions |
string |
The contact group to which alert notifications are sent. |
CloudMonitor |
| ComparisonOperator |
string |
The comparison operator for the threshold of the alert rule. Valid values:
|
GreaterThanYesterday |
| Dimensions |
string |
The dimensions for the alert rule. |
[{"taskId": "cc641dff-c19d-45f3-ad0a-818a0c4f****" }] |
| EvaluationCount |
string |
The number of retries for the alert. |
3 |
| Expression |
string |
The expression of the alert rule. |
$Availability=30 |
| Level |
string |
The level of the alert rule. Valid values:
|
2 |
| MetricName |
string |
The name of the metric. |
Availability |
| Namespace |
string |
The data namespace of the Alibaba Cloud service. |
acs_networkmonitor |
| OkActions |
string |
The contact groups to be notified when the alert is resolved. |
[ "CloudMonitor"] |
| Period |
string |
The time interval. This is usually the reporting cycle of the metric. Unit: seconds. Note
If you set a statistical period, the corresponding statistical data is queried based on this period. |
15s |
| RuleId |
string |
The ID of the alert rule. |
bf071ae_7b7aec3817b0fdf**** |
| RuleName |
string |
The name of the alert rule. |
rule1 |
| StateValue |
string |
The status of the alert. Valid values:
|
OK |
| Statistics |
string |
The statistical method for the alert. Valid values:
|
Availability |
| Threshold |
string |
The alert threshold. |
30 |
| RequestId |
string |
The request ID. |
D17DF650-7EBD-54D0-903A-1D4E624D7402 |
| SiteMonitors |
object |
The details of the monitoring task. |
|
| Address |
string |
The detection address of the monitoring task. |
https://aliyun.com |
| AgentGroup |
string |
The type of the detection point. Default value: PC. Valid values:
|
PC |
| CustomSchedule |
object |
The custom detection period. You can only select a time period from Monday to Sunday for detection. |
|
| days |
object |
||
| days |
array |
The detection day. |
|
|
integer |
The detection day. |
1 |
|
| end_hour |
integer |
The end time of the custom detection period. Unit: hour. |
18 |
| start_hour |
integer |
The start time of the custom detection period. Unit: hour. |
8 |
| time_zone |
string |
The time zone for the custom detection period. |
local |
| Interval |
string |
The interval of the monitoring task. Unit: minutes. Valid values: 1, 5, 15, 30, and 60. |
1 |
| IspCities |
object |
||
| IspCity |
array<object> |
The carriers and cities of the detection points. |
|
|
object |
The carriers and cities of the detection points. |
||
| City |
string |
The city ID. |
738 |
| CityName |
string |
The city name. |
北京市 |
| Isp |
string |
The carrier ID. |
465 |
| IspName |
string |
The carrier name. |
阿里巴巴 |
| Type |
string |
The network type of the detection point. Valid values: IDC: data center LASTMILE: last mile network MOBILE: mobile cellular network |
IDC |
| OptionJson |
object |
The extended options. The extended options vary based on the detection type. For more information, see CreateSiteMonitor . |
|
| assertions |
object |
||
| assertions |
array<object> |
The assertion configuration group. |
|
|
object |
The assertion configuration group. |
||
| operator |
string |
The assertion comparison operator. Valid values:
|
lessThan |
| property |
string |
The path for parsing the assertion content.
|
json path |
| target |
string |
The target value or character for assertion matching. |
0 |
| type |
string |
The assertion type. Valid values:
|
response_time |
| attempts |
integer |
The number of retries after a DNS failure. |
3 |
| auth_info |
object |
Authentication information |
|
| type |
string |
The authentication information. Currently, only HTTP Basic Authentication is supported. The value can be basic. |
basic |
| username |
string |
The username for HTTP Basic Authentication |
test_username |
| password |
string |
The password for HTTP Basic Authentication |
test_password |
| use_cookie_session_key |
boolean |
In digest authentication, this parameter indicates whether the key is stored in the client's cookie. |
false |
| grant_type |
string |
The grant type used in OAuth 2.0 authentication. Valid values are client_credentials and password |
password |
| client_id |
string |
The client ID used for client authentication in OAuth 2.0 |
client_id |
| client_secret |
string |
The client secret used for client authentication in OAuth 2.0 |
client_secret |
| scopes |
object |
||
| scopes |
array |
The requested permission scope in OAuth 2.0. |
|
|
string |
A single permission requested in OAuth 2.0 |
test_operation |
|
| token_url |
string |
The address of the authentication server in OAuth 2.0 |
https://www.example.com |
| auth_style |
string |
The OAuth 2.0 authentication style. Valid values are ROA and RPC |
ROA |
| access_key_id |
string |
Supported only in multi-step network probes. When using Alibaba Cloud authentication, this is the AccessKey ID. We recommend that you use encrypted storage |
testAk |
| access_key_secret |
string |
Supported only in multi-step network probes. When using Alibaba Cloud authentication, this is the AccessKey secret. We recommend that you use encrypted storage |
testSk |
| region_id |
string |
Supported only in multi-step network probes. When using Alibaba Cloud authentication, this is the requested region ID |
cn-hangzhou |
| api_action |
string |
Supported only in multi-step network probes. When using an Alibaba Cloud operation, this is the requested API |
example_api |
| api_version |
string |
Supported only in multi-step network probes. When using an Alibaba Cloud operation, this is the requested API version |
2019-01-01 |
| with_addon_resources |
boolean |
Supported only in multi-step network probes. When this step uses Alibaba Cloud authentication, this indicates whether the operation has additional resources |
false |
| service_name |
string |
The name of the requested service when using AWS authentication. |
example_service_name |
| session_token |
string |
The session_token for AWS authentication |
example_token |
| blocked_url_list |
object |
||
| blocked_url_list |
array |
A list of blocked resource URLs. Wildcard characters are supported in paths. |
|
|
string |
A list of blocked resource URLs. Wildcard characters are supported in paths. |
www.taobao.com/** |
|
| browser_headers |
object |
||
| browser_headers |
array<object> |
Custom headers. The structure is |
|
|
object |
Custom headers. The structure is |
{"key":"value"} |
|
| browser_hosts |
object |
||
| browser_hosts |
array |
Custom hosts. The structure is |
|
|
string |
Custom hosts. The structure is |
{"url":"www.taobao.com","ip":"127.0.0.1"} |
|
| browser_info |
object |
||
| browser_info |
array<object> |
Browser information. |
|
|
object |
Browser information. |
||
| browser |
string |
The type of the browser. |
Chrome |
| device |
string |
The screen type. |
laptop |
| browser_insecure |
boolean |
Specifies whether to ignore certificate errors. Valid values:
|
false |
| browser_task_version |
string |
The version of the browser network probe. Valid values:
|
1 |
| cookie |
string |
The cookie for sending HTTP requests. |
lang=en |
| diagnosis_mtr |
boolean |
Specifies whether to automatically perform an MTR network diagnosis after a task failure. Valid values:
|
false |
| diagnosis_ping |
boolean |
Specifies whether to automatically perform a PING network latency probe after a task failure. Valid values:
|
false |
| dns_hijack_whitelist |
string |
The DNS hijacking configuration list. |
www.taobao.com:www.taobao.com.danuoyi.tbcache.com |
| dns_match_rule |
string |
The matching rule for DNS. Valid values:
|
IN_DNS |
| dns_server |
string |
The IP address of the DNS server. Note
This parameter applies only to the DNS probe type. |
192.168.XX.XX |
| dns_type |
string |
The DNS resolution type. This parameter applies only to the DNS probe type. Valid values:
|
A |
| empty_message |
boolean |
Specifies whether to allow a WebSocket task to return no message or an empty message. Valid values:
|
false |
| expect_exist_string |
object |
||
| expect_exist_string |
array |
A list of strings that are expected to exist on the page. |
|
|
string |
A list of strings that are expected to exist on the page. |
expected string |
|
| expect_non_exist_string |
object |
||
| expect_non_exist_string |
array |
A list of strings that are not expected to exist on the page. |
|
|
string |
A list of strings that are not expected to exist on the page. |
unexpected string |
|
| expect_value |
string |
The alias or address to be resolved. Note
This parameter applies only to the DNS probe type. |
dns_server |
| failure_rate |
number |
The packet loss rate. Note
This parameter applies only to the PING probe type. |
0.4 |
| header |
string |
The HTTP request header. |
testKey:testValue |
| http_method |
string |
The HTTP request method. Valid values:
|
get |
| ip_network |
string |
ip_network indicates the network type of the task. Valid values are v4, v6, and auto. The default value is v4 |
v4 |
| isBase64Encode |
string |
Specifies whether to store the password after Base64 decoding. Valid values:
|
false |
| match_rule |
integer |
Specifies whether to include alert rules. Valid values:
|
1 |
| min_tls_version |
string |
The minimum TLS version. By default, TLS 1.2 and later are supported. TLS 1.0 and 1.1 are disabled. You can change the configuration to support them |
tlsv1.2 |
| password |
string |
The password for SMTP, POP3, or FTP probe types. |
123**** |
| ping_num |
integer |
The number of pings for the PING probe type. |
29 |
| ping_port |
integer |
The PING port. This applies to TCP PING. |
80 |
| ping_type |
string |
The PING protocol type. Valid values:
|
icmp |
| port |
integer |
The port for TCP, UDP, SMTP, and POP3 probe types. |
110 |
| protocol |
string |
The detection protocol. |
TCP |
| quic_enabled |
boolean |
Specifies whether the browser network probe uses the QUIC protocol. Valid values: true: uses the QUIC protocol false: does not use the QUIC protocol The default value is false |
true |
| quic_target |
object |
||
| quic_target |
array |
A list of sites that are forced to use the QUIC protocol |
|
|
string |
A site that is forced to use the QUIC protocol. The format is url:port. The port is optional and defaults to 443 |
www.taobao.com |
|
| request_content |
string |
The request content for the HTTP probe type. |
aa=bb |
| request_format |
string |
The format of the HTTP request content. Valid values:
|
txt |
| response_content |
string |
Matches the response content. |
txt |
| response_format |
string |
The format of the HTTP response content. Valid values:
|
txt |
| retry_delay |
integer |
The number of retries after a detection failure. |
0 |
| screen_shot |
boolean |
Specifies whether to enable page screenshots |
false |
| strict_mode |
boolean |
|
|
| time_out |
integer |
The timeout period. Unit: milliseconds. |
3 |
| traffic_hijack_element_blacklist |
object |
||
| traffic_hijack_element_blacklist |
array |
If a redirection occurs and the URL of the resource loaded by the browser matches an expression in this list, traffic hijacking is considered to have occurred. |
|
|
string |
If a redirection occurs and the URL of the resource loaded by the browser matches an expression in this list, traffic hijacking is considered to have occurred. |
www.taobao.com |
|
| traffic_hijack_element_count |
integer |
If a redirection occurs and the number of resources loaded by the browser exceeds this value, traffic hijacking is considered to have occurred. If this value is 0, no check is performed. The default value is 0. |
0 |
| traffic_hijack_element_whitelist |
object |
||
| traffic_hijack_element_whitelist |
array |
If a redirection occurs and the URL of the resource loaded by the browser does not match any expression in this list, traffic hijacking is considered to have occurred. |
|
|
string |
If a redirection occurs and the URL of the resource loaded by the browser does not match any expression in this list, traffic hijacking is considered to have occurred. |
www.taobao.com |
|
| username |
string |
The username for FTP, SMTP, or POP3. |
testUser |
| waitTime_after_completion |
integer |
The extra wait time after the page is opened in a browser network probe task. |
3 |
| scroll_end |
boolean |
When the task is a browser probe task, scroll_end indicates whether to scroll to the bottom of the page after it is opened. |
false |
| host_binding |
string |
A custom host for an HTTP task. The format is ip1,ip2:address. You can configure multiple lines of mappings. The part to the left of the colon is the A record or CNAME that the domain name can be resolved to, separated by commas. The part to the right of the colon is the domain name. |
127.0.0.1:www.aliyun.com |
| host_binding_type |
integer |
The valid values for host_binding_type are 0 and 1, which indicate how the custom host takes effect. 0 indicates random, and 1 indicates polling. Valid values:
|
0 |
| hops |
integer |
The number of hops for the traceroute diagnosis that is performed when a PING task fails |
20 |
| icmp_timeout_millis |
integer |
The timeout period for a single PING in a PING task that uses the ICMP protocol. Unit: milliseconds |
3000 |
| config_variables |
object |
||
| config_variables |
array<object> |
The environment variable configuration, which takes effect for multi-step probes. |
|
|
object |
Environment variables can be referenced in the parameters of different test steps (using the placeholder {{$.variable_name}}). You can also parse the returned content from a test step, update the value of the corresponding variable, and reference it in the next test step. For sensitive information, such as API keys, you can select encrypted storage. |
||
| name |
string |
The name of the environment variable |
variable_name |
| value |
string |
The value of the variable |
variable_value |
| secure |
boolean |
Encrypted storage |
true |
| steps |
object |
||
| steps |
array<object> |
Takes effect for multi-step probes. The step configuration in a multi-step probe. |
|
|
array<object> |
The configuration for a single step in a multi-step probe. |
||
name
deprecated
|
string |
The step name (deprecated). |
step1 |
| step_type |
string |
The probe type for this step. Optional types are
wait is a wait step. |
http |
| url |
string |
The URL for a single-step probe in a multi-step probe |
https://aliyun.com |
| allow_failure |
boolean |
If the current step fails, specifies whether to continue with the next probe step. The default value is false. |
true |
| is_critical |
boolean |
If the current step fails, the entire probe is marked as failed. The default value is false. |
true |
| wait_time_in_secs |
integer |
The wait time. Unit: seconds. |
5 |
| extracted_variables |
object |
||
| extracted_variables |
array<object> |
Variable extraction configuration |
|
|
array<object> |
Configuration for a single variable extraction. |
||
| name |
string |
The variable name. |
test_variable |
| parser |
object |
Variable extraction method settings |
|
| parser_type |
string |
The mode for extracting variables. 0 is JSON, 1 is XML, and 2 is regular expression. |
0 |
| value |
string |
The variable extraction expression. When the extraction method is JSON or XML, the variable extraction expression supports XML format. When the extraction method is a regular expression, it extracts the string that matches this value. |
x.testkey.arrayvalue[0].innerkey |
| field |
string |
This option takes effect when the variable location is an HTTP header. It extracts the key pointed to by this option in the header. |
request_id |
| extracted_type |
string |
The location from which to extract the variable. 0 is HTTP body, and 1 is HTTP header. |
1 |
| option |
string |
The extended options for this step. The extended options vary based on the probe type. For more information, see CreateSiteMonitor . |
{"enable_operator_dns": true} |
| step_name |
string |
The step name. |
step1 |
| use_generated_cookie |
boolean |
Specifies whether to use the cookie extracted in previous steps. The default value is false. |
true |
| auto_extract_cookie |
boolean |
Automatically extracts cookies. The set-cookie in the header of the response from this single-step HTTP probe is parsed and visible in subsequent probe steps. The default value is false. |
true |
| trace_region |
string |
Specifies the region where the target application is deployed when integrated with Managed Service for OpenTelemetry. |
cn-hangzhou |
| trace_type |
string |
Specifies the tracing protocol used when integrated with Managed Service for OpenTelemetry. Valid values:
|
OpenTelemetry |
| safe_link |
integer |
Takes effect for SMTP tasks. Set this parameter to 1 to use a secure connection. The default value is 0. |
0 |
| enable_packet_capture |
boolean |
Specifies whether to enable packet capture for this task |
true |
| use_private_crt |
boolean |
Specifies whether to use a private certificate |
|
| private_crt_file_name |
string |
The private certificate file name |
cert.pem |
| TaskId |
string |
The ID of the monitoring task. |
cc641dff-c19d-45f3-ad0a-818a0c4f**** |
| TaskName |
string |
The name of the monitoring task. |
test123 |
| TaskState |
string |
The status of the monitoring task. Valid values:
|
1 |
| TaskType |
string |
The type of the monitoring task. Site monitoring task types include HTTP(S), PING, TCP, UDP, DNS, SMTP, POP3, and FTP. |
HTTP |
| VpcConfig |
object |
The VPC configuration for an internal network probe task. |
|
| Region |
string |
The region where the target site of the internal network probe task is located. |
cn-beijing |
| SecurityGroupId |
string |
The security group ID that restricts this internal network probe task. |
sg-xxxxxx |
| VpcId |
string |
The VPC ID to which this internal network probe task is attached. |
vpc-xxxxxx |
| VswitchId |
string |
The vSwitch ID to which this internal network probe task is attached. |
vsw-xxxxxx |
| Success |
boolean |
Indicates whether the operation succeeded. Valid values:
|
true |
Examples
Success response
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,
"auth_info": {
"type": "basic",
"username": "test_username",
"password": "test_password",
"use_cookie_session_key": false,
"grant_type": "password",
"client_id": "client_id",
"client_secret": "client_secret",
"scopes": {
"scopes": [
"test_operation"
]
},
"token_url": "https://www.example.com",
"auth_style": "ROA",
"access_key_id": "testAk",
"access_key_secret": "testSk",
"region_id": "cn-hangzhou",
"api_action": "example_api",
"api_version": "2019-01-01",
"with_addon_resources": false,
"service_name": "example_service_name",
"session_token": "example_token"
},
"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": "false",
"match_rule": 1,
"min_tls_version": "tlsv1.2",
"password": "123****",
"ping_num": 29,
"ping_port": 80,
"ping_type": "icmp",
"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,
"scroll_end": false,
"host_binding": "127.0.0.1:www.aliyun.com",
"host_binding_type": 0,
"hops": 20,
"icmp_timeout_millis": 3000,
"config_variables": {
"config_variables": [
{
"name": "variable_name",
"value": "variable_value",
"secure": true
}
]
},
"steps": {
"steps": [
{
"name": "step1",
"step_type": "http",
"url": "https://aliyun.com",
"allow_failure": true,
"is_critical": true,
"wait_time_in_secs": 5,
"extracted_variables": {
"extracted_variables": [
{
"name": "test_variable",
"parser": {
"parser_type": "0",
"value": "x.testkey.arrayvalue[0].innerkey"
},
"field": "request_id",
"extracted_type": "1"
}
]
},
"option": "{\"enable_operator_dns\": true}",
"step_name": "step1",
"use_generated_cookie": true,
"auto_extract_cookie": true
}
]
},
"trace_region": "cn-hangzhou",
"trace_type": "OpenTelemetry",
"safe_link": 0,
"enable_packet_capture": true,
"use_private_crt": false,
"private_crt_file_name": "cert.pem"
},
"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. | |
| 500 | InternalError | The request processing has failed due to some unknown error. | |
| 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. | The number of tasks exceeds the limit |
| 429 | Throttli∂ngException | The request was denied due to request throttling. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.