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
- Monitoring of DNS resolution failures
You can configure a scheduled task to monitor DNS resolution failures. You can select the detection points of China Mobile, China Telecom, and China Unicom in the provincial capital cities of China. CloudMonitor sends detection requests to your domain name and obtains the resolution results of the domain name from the public DNS servers of the specified carriers. If the resolution results obtained by CloudMonitor are different from the DNS records configured for the domain name, the DNS servers of the specified carriers fail to resolve the domain name. DNS resolution failures may be caused by DNS hijacking and DNS poisoning.
- Monitoring of service availability
You can configure a scheduled task to monitor a HTTP or HTTPS domain name. You can select detection points distributed around the world to send detection requests. The status code in the detection results indicates the availability of your service. After you configure alert rules, CloudMonitor sends alert notifications to you if an abnormal status is detected. Then, you can troubleshoot your service based on the information displayed in the console. In addition, you can observe the network latency between your service and the carrier detection points in different regions. The information helps you understand the user experience of carriers in different regions, and provides a reference for system deployment architecture optimization.
- Comparative analysis of network quality
You can configure a scheduled task to send ping requests to a specific domain name. You can select carrier detection points in different countries and regions. After the task runs for a period of time, you can observe the network latency between your service and the carriers in different countries and regions. You can also configure multiple tasks to send ping requests to different domain names. By comparing the detection results of different tasks, you can observe the network quality of the domain names.
Procedure
What to do next
assertion failed
, the assertion fails. You can perform the following operations to view the cause
of the failure:
- On the Monitoring Tasks tab of the Site Monitoring Tasks page, click the name of the site monitoring task that you want to manage.
- On the Overview page, click the Error tab.
- Find the detection point that you want to troubleshoot, and click Troubleshoot in the Actions column. Then, view the cause of the assertion failure.
Advanced Settings
- HTTP or HTTPS
Parameter Description HTTP Request Header 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 also 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 or invalid characters, the key remains unchanged.
Cookie The HTTP cookie. Request content 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 Mode 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 Acceptable additional HTTP status codes An HTTP status code that is greater than or equal to 400. Separate multiple status codes with commas (,). HTTP Authentication Username The username and password that are used for basic HTTP authentication. HTTP Authentication Password Certificate Verification Specifies whether server name indication (SNI) is supported. By default, the check box is cleared. This indicates that SNI is not supported. Unfollow Redirect 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. Enable PROXY Protocol Specifies whether to enable the PROXY protocol. By default, the check box is cleared. This indicates that the PROXY protocol is not supported. DNS Server The IP address of the DNS server. - TCP or UDP
Parameter Description Request Format This parameter takes effect only if you configure the Request content parameter. Valid values: - Text
- Hexadecimal Format
Request content - 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 This parameter takes effect only if you configure the Content Match parameter. Valid values: - Text
- Hexadecimal Format
Content Match - 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.