Mengambil detail tugas Synthetic Monitoring.
Deskripsi operasi
Synthetic Monitoring saat ini hanya tersedia di region China (Hangzhou). Saat menggunakan SDK atau OpenAPI, pilih endpoint pendaftaran layanan yang sesuai dengan region China (Hangzhou).
Coba sekarang
Test
RAM authorization
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
No |
ID region. |
cn-hangzhou |
| TaskId |
string |
No |
ID tugas Synthetic Monitoring. |
856566a9cb2a4cafa05aa95ed0******* |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
ID permintaan. |
E13430A6-57A9-56E9-9D8D-28FE8DEBCA40 |
| Code |
integer |
Kode status. Nilai 200 menunjukkan keberhasilan. |
200 |
| Message |
string |
Pesan yang dikembalikan. |
success |
| Data |
object |
Struct respons. |
|
| TaskId |
string |
ID tugas Synthetic Monitoring. |
5308a2691f59422c8c3b7aeccec9cd3b |
| RegionId |
string |
ID region. |
cn-hangzhou |
| Name |
string |
Nama tugas Synthetic Monitoring. |
拨测任务 |
| TaskType |
integer |
Jenis tugas. Nilai yang valid:
|
5 |
| MonitorConf |
object |
Konfigurasi tugas. |
|
| NetICMP |
object |
The ICMP synthetic test parameters. This parameter is required if the TaskType parameter is set to 1. |
|
| TargetUrl |
string |
The destination host IP address or domain name |
www.aliyun.com |
| Interval |
integer |
The interval at which ICMP packets are sent. Unit: milliseconds. Minimum value: 200. Maximum value: 2000. Default value: 200. |
200 |
| PackageNum |
integer |
The number of ICMP packets that are sent. Minimum value: 1. Maximum value: 50. Default value: 4. |
4 |
| PackageSize |
integer |
The size of each ICMP packet. Unit: bytes. Valid values: 32, 64, 128, 256, 512, 1024. |
1024 |
| SplitPackage |
boolean |
Specifies whether to split ICMP packets. Default value: true. |
true |
| Timeout |
integer |
The timeout period for the TCP synthetic test. Unit: milliseconds. Minimum value: 1000. Maximum value: 300000. Default value: 20000. |
2000 |
| TracertEnable |
boolean |
Specifies whether to enable the tracert command. Default value: true. |
true |
| TracertNumMax |
integer |
The maximum number of hops for tracert. Minimum value: 1. Maximum value: 128. Default value: 64. |
64 |
| TracertTimeout |
integer |
The timeout period of tracert. Unit: milliseconds. Minimum value: 1000. Maximum value: 300000. Default value: 60000. |
60000 |
| NetTCP |
object |
The TCP synthetic tests parameters. This parameter is required if the TaskType parameter is set to 2. |
|
| TargetUrl |
string |
The destination host IP address. |
127.0.0.1:8888 |
| ConnectTimes |
integer |
The number of TCP connections that are established in a test. Minimum value: 1. Maximum value: 16. Default value: 4. |
4 |
| Interval |
integer |
The interval at which TCP connections are established. Unit: milliseconds. Minimum value: 200. Maximum value: 10000. Default value: 200. |
200 |
| Timeout |
integer |
The timeout period for the TCP synthetic test. Unit: milliseconds. Minimum value: 1000. Maximum value: 300000. Default value: 20000. |
20000 |
| TracertEnable |
boolean |
Specifies whether to enable the tracert command. Default value: true. |
true |
| TracertNumMax |
integer |
The maximum number of hops for tracert. Minimum value: 1. Maximum value: 128. Default value: 20. |
20 |
| TracertTimeout |
integer |
The timeout period of tracert. Unit: milliseconds. Minimum value: 1000. Maximum value: 300000. Default value: 60000. |
60000 |
| NetDNS |
object |
The DNS synthetic test parameters. This parameter is required if the TaskType parameter is set to 3. |
|
| TargetUrl |
string |
The destination domain name. |
www.aliyun.com |
| DnsServerIpType |
integer |
The IP version of the DNS server. 0: IPv4. 1: IPv6. 2: A version is automatically selected. Default value: 0. |
0 |
| NsServer |
string |
The IP address of the DNS server. Default value: 114.114.114.114. |
114.114.114.114 |
| QueryMethod |
integer |
The DNS query. 0: recursive, 1: iterative. Default value: 0. |
0 |
| Timeout |
integer |
The timeout period for the DNS synthetic test. Unit: milliseconds. The minimum value is 1000 and the maximum value is 45000. Default value: 5000. |
5000 |
| ApiHTTP |
object |
The parameters of the HTTP(S) synthetic test. |
|
| TargetUrl |
string |
The URL for synthetic monitoring. |
http://127.0.0.1:8090/api/list |
| Method |
string |
The request method.
|
POST |
| RequestHeaders |
object |
The HTTP request header. |
|
|
string |
Format: JSON map. |
{ "key1": "value1", "key2": "value2" } |
|
| RequestBody |
object |
The HTTP request body. |
|
| Content |
string |
The content of the request body. Format: JSON string. The parameter is required if the type parameter is set to text/plain, application/json, application/xml, or text/html. Format: JSON string. |
text/plain |
| Type |
string |
The type of the request body. Valid values: text/plain, application/json, application/x-www-form-urlencoded, multipart/form-data, application/xml, and text/html. |
multipart/form-data |
| ConnectTimeout |
integer |
The connection timeout period. Unit: milliseconds. Default value: 5000. Minimum value: 1000. Maximum value: 300000. |
5000 |
| Timeout |
integer |
The timeout period. Unit: milliseconds. Default value: 10000. Minimum value: 1000. Maximum value: 300000. |
10000 |
| CheckCert |
boolean |
Whether to verify the certificate. The default is no. |
false |
| ProtocolAlpnProtocol |
integer |
The ALPN protocol version. You can configure this parameter when you perform an HTTPS synthetic test on a WAP mobile client. Valid values: 0: default 1: HTTP/1.1 2: HTTP/2 3: disables the ALPN protocol |
1 |
| FileDownload |
object |
The file download parameters. |
|
| TargetUrl |
string |
The file download URL. |
https://******** |
| DownloadKernel |
integer |
The kernel type.
|
0 |
| QuickProtocol |
integer |
The QUIC protocol type.
|
1 |
| ConnectionTimeout |
integer |
The connection timeout period. Unit: milliseconds. Minimum value: 1000. Maximum value: 120000. Default value: 5000. |
5000 |
| CustomHeaderContent |
object |
The content of the custom request header. |
|
|
string |
Format: JSON map. |
{ "key1": "value1", "key2": "value2" } |
|
| IgnoreCertificateStatusError |
integer |
Specifies whether to ignore certificate status errors. 0: No. 1: Yes. Default value: 1. |
0 |
| IgnoreCertificateUntrustworthyError |
integer |
Specifies whether to ignore certificate incredibility. 0: No. 1: Yes. Default value: 1. |
0 |
| IgnoreInvalidHostError |
integer |
Specifies whether to ignore host invalidity. 0: No. 1: Yes. Default value: 1. |
0 |
| MonitorTimeout |
integer |
The monitoring timeout period. Unit: milliseconds. Minimum value: 1000. Maximum value: 120000. Default value: 60000. |
6000 |
| Redirection |
integer |
Specifies whether to support redirection. 0: No. 1: Yes. Default value: 1. |
0 |
| TransmissionSize |
integer |
The maximum file size of a single transfer. Unit: KB. Minimum value: 1. Maximum value: 20480. Valid values: 2048. |
2048 |
| IgnoreCertificateCanceledError |
integer |
Specifies whether to ignore certificate revocation errors. 0: No. 1: Yes. Default value: 1. |
0 |
| IgnoreCertificateAuthError |
integer |
Specifies whether to ignore CA certificate authentication errors. 0: No. 1: Yes. Default value: 1. |
0 |
| IgnoreCertificateOutOfDateError |
integer |
Specifies whether to ignore certificate invalidity. 0: No. 1: Yes. Default value: 1. |
0 |
| IgnoreCertificateUsingError |
integer |
Specifies whether to ignore certificate usage errors. 0: No. 1: Yes. Default value: 1. |
0 |
| VerifyWay |
integer |
Verification method.
|
0 |
| ValidateKeywords |
string |
Verify keywords. |
success |
| WhiteList |
string |
DNS hijacking whitelist. Matching rules support IP, IP wildcard, subnet mask and CNAME. You can fill in multiple matching rules, and multiple matching rules are separated by vertical bars (|). For example: |
www.aliyun.com:203.0.3.55|203.3.44.67 |
| Website |
object |
The website-speed measurement parameters. |
|
| TargetUrl |
string |
The destination URL. |
http://www.aliyun.com |
| AutomaticScrolling |
integer |
Specifies whether to automatically scroll up and down the screen to load a page. 0: No. 1: Yes. Default value: 0. |
0 |
| CustomHeader |
integer |
Specifies whether to create a custom header. 0: No. 1: The first packet is modified. 2: All packets are modified. Default value: 0. |
0 |
| CustomHeaderContent |
object |
The custom header. Format: JSON map. |
|
|
string |
JSON Map |
{ "key1": "value1", "key2": "value2" } |
|
| DisableCache |
integer |
Specifies whether to disable the cache. 0: No. 1: Yes. Default value: 1. |
1 |
| DisableCompression |
integer |
Specifies whether to accept compressed files based on the HTTP Accept-Encoding request header. 0: No. 1: Yes. Default value: 0. |
0 |
| FilterInvalidIP |
integer |
Specifies whether to exclude invalid IP addresses.
|
0 |
| IgnoreCertificateError |
integer |
Specifies whether to ignore SSL certificate errors during browsing. 0: No. 1: Yes. Default value: 1. |
0 |
| MonitorTimeout |
integer |
The monitoring timeout period. Unit: milliseconds. Default value: 20000. Minimum value: 5000. Maximum value: 300000. |
20000 |
| Redirection |
integer |
Specifies whether to continue browsing after redirection. 0: No, 1:Yes. Default value: 1. |
1 |
| SlowElementThreshold |
integer |
The time threshold that is used to define a slow element. Unit: milliseconds. Default value: 5000. Minimum value: 1. Maximum value: 300000. |
5000 |
| WaitCompletionTime |
integer |
The maximum waiting time. Unit: milliseconds. Default value: 5000. Minimum value: 5000. Maximum value: 300000. |
5000 |
| VerifyStringBlacklist |
string |
The verification string is an arbitrary string in the source code of the monitoring page. If the source code returned by the client contains any string in the blacklist, an error 650 "Verification string failed" will be reported. Multiple strings are separated by vertical bars (|). |
error |
| VerifyStringWhitelist |
string |
The verification string is an arbitrary string in the source code of the monitoring page. The source code returned by the client must contain all the strings in the whitelist, otherwise an error 650 "Verification string failed" will be reported. Multiple strings are separated by a vertical bar (|). |
success |
| ElementBlacklist |
string |
If an element configured in the element blacklist appears during page loading, no request will be made to load the element. |
www.example.com/a.jpg |
| DNSHijackWhitelist |
string |
When resolving a domain name (such as www.aliyun.com), if the resolved IP address or CNAME is not in the DNS hijacking whitelist, the user will fail to access or return a non-Aliyun target IP; if the IP or CNAME in the resolution result is in the DNS whitelist, it will be deemed that no DNS hijacking has occurred. Fill in the format: For example: |
www.aliyun.com:203.0.3.55|203.3.44.67 |
| PageTamper |
string |
If any element other than the domain name setting appears on the monitoring page, it means that the page has been tampered. Common manifestations include pop-up ads, floating ads, jumps, etc. Fill in the format: |
www.aliyun.com:|/cc/bb/a.gif|/vv/bb/cc.jpg |
| FlowHijackJumpTimes |
integer |
Identify elements: Set the total number of elements to browse the page. |
0 |
| FlowHijackLogo |
string |
Hijacking flag: Set the key information for matching. Fill in the hijacking judgment keyword or key element, and asterisks (*) are allowed. |
aliyun |
| Stream |
object |
Streaming media dial test configuration. |
|
| TargetUrl |
string |
Streaming media resource address. |
http://www.aliyun.com/stream/test.mp4 |
| StreamType |
integer |
Audio and video flag:
|
0 |
| StreamMonitorTimeout |
integer |
Monitoring duration, in seconds, supports up to 60 seconds. If not specified, the default value is 60 seconds. |
30 |
| StreamAddressType |
integer |
Resource address type:
|
0 |
| PlayerType |
integer |
Player, default is 12 if not specified.
|
12 |
| CustomHeaderContent |
object |
Custom header, JSON Map format. |
|
|
string |
Custom header, JSON Map format. |
{ "key1": "value1", "key2": "value2" } |
|
| WhiteList |
string |
DNS hijacking whitelist. Matching rules support IP, IP wildcard, subnet mask and CNAME. You can fill in multiple matching rules, and multiple matching rules are separated by vertical bars (|). For example: |
www.aliyun.com:203.0.3.55|203.3.44.67 |
| MonitorCategory |
integer |
Jenis titik pemantauan. Nilai yang valid:
|
1 |
| Monitors |
array<object> |
Daftar titik pemantauan. |
|
|
object |
Daftar titik pemantauan. |
||
| CityCode |
string |
The city code. |
110100 |
| OperatorCode |
string |
The carrier code. |
1 |
| ClientType |
integer |
The client type of the monitoring point. Valid values: 1: data center. 2: Internet. 3: mobile device. 4: ECS instance. |
1 |
| Frequency |
string |
Frekuensi pemantauan. Nilai yang valid: 1m, 5m, 10m, 15m, 20m, 30m, 1h, 2h, 3h, 4h, 6h, 8h, 12h, dan 24h. |
5m |
| CustomPeriod |
object |
Periode kustom. |
|
| EndHour |
integer |
The hour at which the test ends. Valid values: 0 to 24. |
22 |
| StartHour |
integer |
The hour at which the test starts. Valid values: 0 to 24. |
14 |
| CommonSetting |
object |
Pengaturan umum. |
|
| CustomHost |
object |
The custom host. |
|
| Hosts |
array<object> |
The list of hosts. |
|
|
object |
The list of hosts. |
||
| Domain |
string |
The domain name. |
www.aliyun.com |
| IpType |
integer |
The IP version. Valid values:
|
0 |
| Ips |
array |
The list of IP addresses. |
|
|
string |
The IP address. |
10.0.114.17 |
|
| SelectType |
integer |
The selection mode. 0: Random. 1: Polling. |
0 |
| IpType |
integer |
The IP version. Valid values:
|
0 |
| MonitorSamples |
integer |
Specifies whether to evenly distribute monitoring samples. Valid values:
|
0 |
| IsOpenTrace |
boolean |
Whether to enable tracing. |
true |
| TraceClientType |
integer |
Tracing client type:
|
1 |
| XtraceRegion |
string |
Tracing data reporting region. |
cn-hangzhou |
| CustomVPCSetting |
object |
User VPC information. If the dial-up is to the Alibaba Cloud intranet address, you need to configure the VPC information. |
|
| RegionId |
string |
The region ID. |
cn-hangzhou |
| VpcId |
string |
VPC ID. |
vpc-2zexy5nae9q2otaxxxx |
| VSwitchId |
string |
The vSwitch ID. |
vsw-bp1i0xezblf1yrz4xxxxx |
| SecureGroupId |
string |
Security group ID. This security group is where the dial-up client is located. The security group limits the inbound and outbound rules of the dial-up client in the VPC. You need to set the inbound rules of the security group where your VPC is located to allow the security group where the dial-up client is located to access. Otherwise, the dial-up client cannot smoothly access the resources in your VPC. |
sg-xxxxxxx |
| CustomPrometheusSetting |
object |
The reserved parameters. |
|
| PrometheusLabels |
object |
A reserved parameter. |
|
|
string |
A reserved parameter. |
保留字段。 |
|
| PrometheusClusterId |
string |
A reserved parameter. |
保留字段。 |
| PrometheusClusterRegion |
string |
A reserved parameter. |
保留字段。 |
| AvailableAssertions |
array<object> |
Daftar asersi. |
|
|
object |
Daftar asersi. |
||
| Type |
string |
The assertion type. Valid values: HttpResCode, HttpResHead, HttpResBody, HttpResBodyJson, HttpResponseTime, IcmpPackLoss (packet loss rate), IcmpPackMaxLatency (maximum packet latency), IcmpPackAvgLatency (average packet latency), TraceRouteHops (number of hops), DnsARecord (A record), DnsCName (CNAME), websiteTTFB (time to first packet), websiteTTLB (time to last packet), websiteFST (first paint time), websiteFFST (first meaningful paint), websiteOnload (full loaded time). For more information, see the following description. |
websiteTTLB |
| Target |
string |
The check target. If you set the type parameter to HttpResCode, HttpResBody, or HttpResponseTime, you do not need to set the target parameter. If you set the type parameter to HttpResHead, you must specify the key in the header. If you set the type parameter to HttpResBodyJson, use jsonPath. |
key |
| Operator |
string |
The condition. gt: greater than. gte: greater than or equal to. lt: less than. lte: less than or equal to. eq: equal to. neq: not equal to. ctn: contain. nctn: does not contain. exist: exist. n_exist: does not exist. belong: belong to. n_belong: does not belong to. reg_match: regular expression. |
gt |
| Expect |
string |
The expected value. |
100 |
| Status |
string |
Status tugas. Nilai yang valid:
|
RUNNING |
| ResourceGroupId |
string |
ID grup sumber daya. |
default |
| Tags |
array<object> |
Tag. |
|
|
object |
Tag. |
||
| Key |
string |
The key of the tag. |
user1 |
| Value |
string |
The value of the tag. |
p_运维 |
Contoh
Respons sukses
JSONformat
{
"RequestId": "E13430A6-57A9-56E9-9D8D-28FE8DEBCA40",
"Code": 200,
"Message": "success",
"Data": {
"TaskId": "5308a2691f59422c8c3b7aeccec9cd3b",
"RegionId": "cn-hangzhou",
"Name": "拨测任务",
"TaskType": 5,
"MonitorConf": {
"NetICMP": {
"TargetUrl": "www.aliyun.com",
"Interval": 200,
"PackageNum": 4,
"PackageSize": 1024,
"SplitPackage": true,
"Timeout": 2000,
"TracertEnable": true,
"TracertNumMax": 64,
"TracertTimeout": 60000
},
"NetTCP": {
"TargetUrl": "127.0.0.1:8888",
"ConnectTimes": 4,
"Interval": 200,
"Timeout": 20000,
"TracertEnable": true,
"TracertNumMax": 20,
"TracertTimeout": 60000
},
"NetDNS": {
"TargetUrl": "www.aliyun.com",
"DnsServerIpType": 0,
"NsServer": "114.114.114.114",
"QueryMethod": 0,
"Timeout": 5000
},
"ApiHTTP": {
"TargetUrl": "http://127.0.0.1:8090/api/list",
"Method": "POST",
"RequestHeaders": {
"key": "{\n \"key1\": \"value1\",\n \"key2\": \"value2\"\n}"
},
"RequestBody": {
"Content": "text/plain",
"Type": "multipart/form-data"
},
"ConnectTimeout": 5000,
"Timeout": 10000,
"CheckCert": false,
"ProtocolAlpnProtocol": 1
},
"FileDownload": {
"TargetUrl": "https://********",
"DownloadKernel": 0,
"QuickProtocol": 1,
"ConnectionTimeout": 5000,
"CustomHeaderContent": {
"key": "{\n \"key1\": \"value1\",\n \"key2\": \"value2\"\n}"
},
"IgnoreCertificateStatusError": 0,
"IgnoreCertificateUntrustworthyError": 0,
"IgnoreInvalidHostError": 0,
"MonitorTimeout": 6000,
"Redirection": 0,
"TransmissionSize": 2048,
"IgnoreCertificateCanceledError": 0,
"IgnoreCertificateAuthError": 0,
"IgnoreCertificateOutOfDateError": 0,
"IgnoreCertificateUsingError": 0,
"VerifyWay": 0,
"ValidateKeywords": "success",
"WhiteList": "www.aliyun.com:203.0.3.55|203.3.44.67"
},
"Website": {
"TargetUrl": "http://www.aliyun.com",
"AutomaticScrolling": 0,
"CustomHeader": 0,
"CustomHeaderContent": {
"key": "{\n \"key1\": \"value1\",\n \"key2\": \"value2\"\n}\n"
},
"DisableCache": 1,
"DisableCompression": 0,
"FilterInvalidIP": 0,
"IgnoreCertificateError": 0,
"MonitorTimeout": 20000,
"Redirection": 1,
"SlowElementThreshold": 5000,
"WaitCompletionTime": 5000,
"VerifyStringBlacklist": "error",
"VerifyStringWhitelist": "success",
"ElementBlacklist": "www.example.com/a.jpg",
"DNSHijackWhitelist": "www.aliyun.com:203.0.3.55|203.3.44.67",
"PageTamper": "www.aliyun.com:|/cc/bb/a.gif|/vv/bb/cc.jpg",
"FlowHijackJumpTimes": 0,
"FlowHijackLogo": "aliyun"
},
"Stream": {
"TargetUrl": "http://www.aliyun.com/stream/test.mp4",
"StreamType": 0,
"StreamMonitorTimeout": 30,
"StreamAddressType": 0,
"PlayerType": 12,
"CustomHeaderContent": {
"key": "{\n \"key1\": \"value1\",\n \"key2\": \"value2\"\n}"
},
"WhiteList": "www.aliyun.com:203.0.3.55|203.3.44.67"
}
},
"MonitorCategory": 1,
"Monitors": [
{
"CityCode": "110100",
"OperatorCode": "1",
"ClientType": 1
}
],
"Frequency": "5m",
"CustomPeriod": {
"EndHour": 22,
"StartHour": 14
},
"CommonSetting": {
"CustomHost": {
"Hosts": [
{
"Domain": "www.aliyun.com",
"IpType": 0,
"Ips": [
"10.0.114.17"
]
}
],
"SelectType": 0
},
"IpType": 0,
"MonitorSamples": 0,
"IsOpenTrace": true,
"TraceClientType": 1,
"XtraceRegion": "cn-hangzhou",
"CustomVPCSetting": {
"RegionId": "cn-hangzhou",
"VpcId": "vpc-2zexy5nae9q2otaxxxx",
"VSwitchId": "vsw-bp1i0xezblf1yrz4xxxxx",
"SecureGroupId": "sg-xxxxxxx"
},
"CustomPrometheusSetting": {
"PrometheusLabels": {
"key": "保留字段。"
},
"PrometheusClusterId": "保留字段。",
"PrometheusClusterRegion": "保留字段。"
}
},
"AvailableAssertions": [
{
"Type": "websiteTTLB",
"Target": "key\n",
"Operator": "gt",
"Expect": "100"
}
],
"Status": "RUNNING",
"ResourceGroupId": "default",
"Tags": [
{
"Key": "user1",
"Value": "p_运维"
}
]
}
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | ParameterMissing | %s | |
| 400 | ParameterIllegal | %s | |
| 400 | TaskQuotaLimit | %s | |
| 400 | ParameterRegionIllegal | %s | |
| 400 | DuplicateTagKey | Param tagKey is duplicate. | |
| 400 | TagNumOUT | the number of tag is out . | |
| 400 | NoPermissionUSER | user no permission | |
| 403 | RAMNotAuthorize | %s | |
| 403 | STSNotAuthorize | %s | |
| 403 | IllegalUserAccess | %s | |
| 403 | APINotAuthorize | %s | |
| 403 | CommercialStatusException | %s | |
| 403 | SyntheticTrailExpired | %s | |
| 403 | SyntheticInDebt | %s | |
| 403 | SyntheticDailyTimesExhausted | %s | |
| 403 | SyntheticDailyLimit | %s |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.