If a local service times out or returns an error code, CloudMonitor sends an alert notification to you.

Prerequisites

Procedure

  1. Log on to the CloudMonitor console.
  2. In the left-side navigation pane, click Application Groups.
  3. On the Application Group tab, click the name of the application group.
  4. In the left-side navigation pane, click Availability Monitoring.
  5. Click Add availability monitoring.
  6. In the Create a task step of the Create/Modify Availability Monitoring panel, set the parameters based on your needs.
    Parameter Description
    Task Name The name of the availability monitoring task.
    Target Server The ID of the instance that you want to monitor.
    Detection Target The object that you want to monitor.

    Set the Detection Type parameter to URL or IP address.

    Detection Type The method that you want to use to monitor the object. You can select one of the following methods:
    • HTTP(S): Enter the URL of the object. Format: localhost:port/path. Set the Request Method parameter to HEAD, GET, or POST.
    • TELNET: Enter the IP address of the object. Format: 127.0.0.1:port.
    • PING: Enter the IP address of the object.

    For example, to check whether Apache Tomcat responds as expected, select HTTP(S) and enter localhost:8080/monitor. To check the connectivity of a MySQL database, select TELNET and enter 127.0.0.1:3306.

    Request Method The request method of the monitoring. Valid values: HEAD, GET, and POST.
    Note This parameter is required if you set the Detection Type parameter to HTTP(S).
    Monitoring Frequency The duration of a monitoring cycle.

    Valid values: 15Second, 30Second, 1 Minutes, 2 Minutes, 5 Minutes, 15 Minutes, 30 Minutes, and 60 Minutes. For example, if you set the Monitoring Frequency parameter to 1 Minutes, CloudMonitor monitors the object once a minute.

    Note This parameter is required if you set the Detection Type parameter to HTTP(S).
    Headers The headers of the HTTP or HTTPS request.

    Format: parameter1:value1.

    Separate multiple headers with commas (,).

    Note This parameter is required if you set the Detection Type parameter to HTTP(S).
    Content Submission The content of the POST request.

    Format: parameter1=value1¶meter2=value2. The content must be English.

    Note This parameter is required if you set the Detection Type parameter to HTTP(S) and the Request Method parameter to POST.
    Match response content The response content that you want to match and the method to match the response content.
    If you specify response content, the monitoring task checks whether the first 64 KB of the HTTP response body contains the response content that you specify. Valid values:
    • Alert if the matching content is included.
    • Alert if the matching content not included.
    Note This parameter is required if you set the Detection Type parameter to HTTP(S).
  7. Click Next.
  8. In the Configure Alert Rule step, set the parameters.
    Parameter Description
    Status Code

    If the status code reaches the specified value, an alert is triggered.

    An alert is triggered regardless of which value of the Status Code parameter or the Response Time parameter reaches the threshold. CloudMonitor sends alert notifications to the alert contact group of the application group.

    Response Time

    If the response time reaches the specified value, an alert is triggered.

    An alert is triggered regardless of which value of the Status Code parameter or the Response Time parameter reaches the threshold. CloudMonitor sends alert notifications to the alert contact group of the application group.

    Notification Methods The methods used to send alert notifications. Valid values:

    Info (Email + DingTalk)

    HTTP WebHook The URL that is used to receive the alert notifications sent from CloudMonitor by using HTTP POST requests. The URL must be accessible over the Internet. You can enter only an HTTP URL.
    Mute for The interval at which CloudMonitor sends alert notifications after the first alert notification is sent. Valid values: 5 Minutes, 15 Minutes, 30 Minutes, 60 Minutes, 3hour, 6hour, 12hour, and 24hour.

    If the threshold value is exceeded, CloudMonitor sends an alert notification. If the threshold value is exceeded again within the mute period, CloudMonitor does not resend an alert notification. If the alert is not cleared when the mute period elapses, CloudMonitor resends an alert notification.

    Effective Time The validity period of the alert rule. The system sends alert notifications only within the validity period of an alert rule and records events when the validity period expires.
  9. Click OK.