You can create a site monitoring task to monitor sites on the Internet and analyze network quality or performance.
Prerequisites
- Alert contacts and alert contact groups are created if you need to configure alert rules for a site monitoring task. When you configure an alert rule, you can select an alert contact group as the alert notification recipient. For more information, see Create an alert contact or alert contact group.
- A callback URL that can be accessed over the Internet is prepared if you need to enable the alert callback feature for alert rules. In addition, URL callback is enabled as an alert notification method in your existing O&M or notification system.
Background information
To test and monitor access to your site, site monitoring sends detection requests that simulate real user access from Alibaba Cloud data centers to your site. Site monitoring is applicable to the following scenarios:
- Create a site monitoring task to obtain information about the destination site, such as the time consumed to resolve the domain name to an IP address, establish the connection, receive the first packet, and download data. You can use the information that you obtain to analyze the performance bottlenecks of your service.
- Monitor the sites of Alibaba Cloud and carriers at the same time by using selected detection points. You can compare the quality of Alibaba Cloud services with the quality of the services provided by the carriers based on the monitoring results.
- Send detection requests from all Alibaba Cloud regions.
Procedure
Description
- HTTP or HTTPS
Parameter Setting method Required Description Monitor Domain Name URL or domain name Yes None. Request Method Option button Yes The HTTP request method. Valid values:- GET (default value)
- POST
- HEAD
Request content Form data or JSON objects No The request content can contain multiple key-value pairs in the key1=value1;key2=value2
format or a JSON string in the{"test":"testValue"}
format.Note This parameter is required if you set the Request Method parameter to POST.Match response method Option button Yes If you specify the response content that you want to match, site monitoring checks whether the first 64 KB of the response body contains the response content that you specify. Valid values:- Generate Alerts If Response Contains
- Generate Alerts If Response Does Not Contain
Site monitoring determines whether to generate an alert based on the mode in which the response is matched.
The matching content must be in English.
Match Response Content Text No HTTP request header Multiple lines of text No An HTTP header is a key-value pair in which the key and value are separated by a colon (:). Each HTTP header occupies a line.Site monitoring adds the following preset headers to the request:
Host:${Domain name in the monitored address}
Pragma:no-cache
Cache-Control:no-cache
User-Agent:Chrome/57
Accept: */*
If the request body is a form, the request contains the following header:
Content-Type: application/x-www-form-urlencoded;charset=UTF-8
If your request contains one or more of the preceding headers, the headers are overwritten by your settings.
Note Site monitoring converts the keys that you specify in the request headers to the canonical format of MIME headers based on the following rules of the HTTP protocol:- The first letter and the letter that follows a hyphen (-) are converted to uppercase letters. For example, accept-encoding is converted to Accept-Encoding.
- If a key contains a space character or invalid characters, the key remains unchanged.
Acceptable additional HTTP status codes Text No An HTTP status code that is greater than or equal to 400. Separate multiple status codes with commas (,). Cookie Cookie text No The HTTP cookie. HTTP Authentication Username Username No The username and password that are used for basic HTTP authentication. HTTP Authentication Password Password No Certificate Verification Check box No Specifies whether server name indication (SNI) is supported. By default, the check box is cleared. This indicates that SNI is not supported. Unfollow Redirect Check box No Specifies whether to follow redirects if the status code 301 or 302 is returned. By default, the check box is cleared. This indicates that redirects are followed. Whether to turn on ProxyProtocol Check box No By default, the check box is cleared. This indicates that the proxy protocol is not supported. - PING
Parameter Setting method Required Description Monitor Domain Name URL or domain name Yes None. Number of ping packets Positive integer Yes The number of times that the site is pinged. Default value: 20. Valid values: 1 to 40. - TCP or UDP
Parameter Setting method Required Description Monitor Domain Name URL or domain name Yes None. Port Positive integer Yes The TCP or UDP port. Request Format Option button Yes This parameter takes effect only if you set the Request content parameter. Valid values: - Text
- Hexadecimal Format
Request content Common text or hexadecimal format No - Common text
Common text refers to strings that consist of printable characters.Note Common text does not support escaping. For example, \n is considered as two characters (\ and n) rather than the newline character.
- Hexadecimal format
If the request content is a byte string that cannot be presented in printable characters, you can convert the byte string to a hexadecimal string that consists of printable characters. Conversion rules: A byte is converted to two hexadecimal characters. For example,
(byte)1
is converted to 01, and(byte)27
is converted to 1B.Binary array in the Java format:
{(byte)1, (byte)27}
is converted to 011b or 011B. Hexadecimal characters are not case-sensitive in site monitoring. Enter"011B"
in the Request content field and set the Request Format parameter to Hexadecimal Format.
Matching Content Format Option button Yes This parameter takes effect only if you set the Content Match parameter. Valid values: - Text
- Hexadecimal Format
Content Match Common text or hexadecimal format No - Common text
Common text refers to strings that consist of printable characters.Note Common text does not support escaping. For example, \n is considered as two characters (\ and n) rather than the newline character.
- Hexadecimal format
If the request content is a byte string that cannot be presented in printable characters, you can convert the byte string to a hexadecimal string that consists of printable characters. Conversion rules: A byte is converted to two hexadecimal characters. For example,
(byte)1
is converted to 01, and(byte)27
is converted to 1B.Binary array in the Java format:
{(byte)1, (byte)27}
is converted to 011b or 011B. Hexadecimal characters are not case-sensitive in site monitoring. Enter"011B"
in the Request content field and set the Request Format parameter to Hexadecimal Format.
- DNS
Parameter Setting method Required Description Monitor Domain Name URL or domain name Yes None. Type Option button Yes The type of DNS records that you want to query. Valid values: A, MX, NS, CNAME, TXT, ANY, and AAA. Default value: A.
DNS Server Domain name or IP address of the server No If you do not set this parameter, the default DNS server address of the detection point is used. You can enter a domain name or an IP address. Expected to resolve IP address or domain Multiple lines of text No CloudMonitor checks whether the DNS resolution result contains the expected domain names or IP addresses. If the list of expected values is a subset of the list of DNS results, the detection is considered successful.
Separate multiple domain names or IP addresses with commas (,).
Match Rule An option from the drop-down list Yes The matching rule for the domain name or IP address. - SMTP
Parameter Setting method Required Description Monitor Domain Name URL or domain name Yes None. Port Positive integer Yes The SMTP port. Username Text Yes The username and password that are used for PLAIN authentication.
Make sure that the username and password that you specify are correct. Site monitoring sends detection requests based on the frequency that you specify. If the username or password is wrong, your account may be blocked by the destination service due to frequent logon failures.
Password Text Yes Secure Connection Option button Yes Specifies whether to use Secure Sockets Layer (SSL) for the SMTP connection. Valid values: - Use
- Not Use
- POP3
Parameter Setting method Required Description Monitor Domain Name URL or domain name Yes None. Port Positive integer Yes The POP3 port. Username Text Yes The username and password that are used for authentication.
Make sure that the username and password that you specify are correct. Site monitoring sends detection requests based on the frequency that you specify. If the username or password is wrong, your account may be blocked by the destination service due to frequent logon failures.
Password Text Yes Secure Connection Option button Yes Specifies whether to use SSL for the POP3 connection. Valid values: - Use
- Not Use
- FTP
Parameter Setting method Required Description Monitor Domain Name URL or domain name Yes Example: ftp://smtp.aliyun.com. Port Positive integer Yes The FTP port. Anonymous Logon Option button Yes - Anonymous Logon (default value)
- Authentication Required
If you select the Authentication Required option, you must specify the username and password of the FTP server.
Username Text Yes The username and password of the FTP server.
Password Text Yes