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

  1. Log on to the CloudMonitor console.
  2. In the left-side navigation pane, choose Network Analysis and Monitoring > Site Monitoring (Timing Dial Test).
  3. On the Monitoring Tasks tab, click Create Task.
  4. In the Task Settings step of the Create Task panel, select a protocol and configure the basic information about the protocol.
    Parameter Description
    Monitoring Type The protocol that is used by the site monitoring task. Valid values: HTTP(S), PING, TCP, UDP, DNS, SMTP, POP3, and FTP.
    Task Name The name of the site monitoring task. The name must be 4 to 100 characters in length, and can contain letters, digits, and underscores (_).
    IP Probe Type The type of the IP address that is used by the site monitoring task. Valid values: IPV4 and IPV6.
    Monitor Domain Name The address of the site that you want to monitor. Valid values:
    • Manually Enter Task Address: Enter the address of the site that you want to monitor. You can enter multiple addresses. Separate multiple addresses with line feeds. After you configure a site monitoring task, CloudMonitor generates a sub-task for each site address that you specify.
    • Import from Cloud Resolution Domain Name: Select the domain name of the site that you want to monitor from Alibaba Cloud DNS. For more information about how to create a DNS domain name, see Add an A record to a website domain.
    Frequency The frequency at which the site monitoring task sends detection requests to the site that you want to monitor. Valid values: 1Minute, 5Minute, 15Minute, 30Minute, and 60Minute. For example, if you select 1Minute, a detection point in a region sends a detection request to the site that you want to monitor every minute.
    Advanced Settings The advanced settings for the selected protocol. For more information about the advanced settings that are supported by different protocols, see Description.
  5. Click Next.
  6. In the Select Detection Points step, select the detection points that you want to use.
    Note If the default detection points cannot meet your business requirements, perform the following steps to add custom detection points.
    1. Click the Modify icon next to Custom probe point selection.
    2. Click Create Template.
    3. Enter a custom template name in the Template Name field and select custom detection points that you want to use.
    4. Click OK.
    5. Click OK.
  7. Click Next.
  8. In the Set Alerts step, add alert rules and configure the advanced settings for the alert rules.
    1. Optional. Add an alert rule.
      Note CloudMonitor provides two default alert rules. If the default rules cannot meet your buiness requirements, perform the following steps to add an alert rule.
      1. Click Add Rule Description.
      2. In the panel that appears, set the parameters. The following table describes the parameters.
        Parameter Description
        Rule Name The name of the alert rule.
        Metric Name The name of the metric that is related to the alert rule. Valid values:
        • Percentage of available probe points

          Value of the Percentage of available probe points metric = Value of the Number of available probe points metric/Total number of detection requests × 100%.

        • Number of available probe points

          This metric specifies the number of times that the domain name or IP address of the site can be accessed as expected in a monitoring period.

        • Any Status Code (Independent Alert)

          If one of the results that are returned by the probe points matches the value of this metric, an alert is triggered.

        • All Status Code (Combined Alert)

          If all results that are returned by the probe points match the value of this metric, an alert is triggered.

        • ResponseTime
        Comparison The comparison operator that is used in the alert rule. Valid values:
        • >=
        • >
        • <=
        • <
        • =
        • !=
        • Compare With Yesterday Rise
        • Compare With Yesterday Decline
        • Compare With Last Week Rise
        • Compare With Last Week Decline
        • Compare With Last Period Rise
        • Compare With Last Period Decline
        Threshold and Alert Level The alert level and the corresponding threshold.

        Valid values of the alert level: Critical, Warn, and Info.

        Valid values of the number of consecutive periods in which the metric value crosses the threshold before an alert is triggered: 1, 2, 3, 4, 5, 10, 15, and 20.

        Alert Contact Group The alert contact group to which alert notifications are sent.
      3. Click OK.
    2. Click Advanced Settings to configure the advanced settings for the alert rules.
      Parameter Description
      Mute For The interval at which CloudMonitor sends alert notifications until the alert that is triggered based on the alert rule is cleared.

      An alert is triggered if the conditions of an alert rule are met. CloudMonitor does not resend an alert notification when the alert is triggered within the mute period. If the alert is not cleared after the mute period ends, CloudMonitor resends alert notifications.

      Effective Time The period during which the alert rules are effective. CloudMonitor monitors metrics and generates alerts only if the alert rules are effective.
      Alert Callback The callback URL that can be accessed over the Internet. CloudMonitor sends a POST request to push an alert notification to the callback URL that you specify. Only HTTP requests are supported. For more information about how to configure alert callback, see Use the alert callback feature to send notifications about threshold-triggered alerts.
  9. Click Finish.

Description

The following tables describe the advanced settings for different protocols.
  • 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