You can customize alert rules to specify how the alert system checks the monitoring data and when it sends alert notifications. After you set alert rules for important metrics, you can receive alert notifications immediately after exceptions occur and handle the exceptions in a timely manner.

Background information

  • You can set the mute period for alert rules. During the mute period, the notification is not re-sent for an alert before the alert is cleared.
  • By default, CloudMonitor adds your Alibaba Cloud account as an alert contact and automatically creates an alert group for the alert contact.

Procedure

  1. Create an alert contact.
    1. Log on to the CloudMonitor console.
    2. In the left-side navigation pane, choose Alarms > Alarm Contacts.
    3. On the Alarm Contacts page, click Create Alarm Contact.
    4. In the Set Alarm Contact right-side pane, set the Name, Email ID, and DingTalk Robot parameters.
      Make sure that you specify the correct email address. Otherwise, you cannot receive alert notifications.
    5. Click OK.
  2. Create an alert group.
    1. On the Alarm Contacts page, click the Alarm Contact Group tab.
    2. On the Alarm Contact Group tab, click Create Alarm Contact Group.
    3. In the Create Alarm Contact Group right-side pane, specify the alert group name and add alert contacts to the alert group.
    4. Click Confirm.
  3. Create an alert rule.
    1. In the left-side navigation pane, choose Alarms > Alarm Rules.
    2. On the Threshold Value Alarm tab of the Alarm Rules page, click Create Alarm Rule.
    3. On the Create Alarm Rule page, set the parameters in the Related Resource, Set Alarm Rules, and Notification Method sections.
      The following table describes the parameters for configuring an alert rule.
      Parameter Description
      Product The name of the service monitored by CloudMonitor. Example: ECS.
      Resource Range The range of resources to which the alert rule is applied. Valid values: All Resources and Instances.
      • All Resources: The alert rule is applied to all your instances of the specified service. Assume that you set the Resource Range parameter to All Resources and the alert threshold for CPU usage of ApsaraDB for MongoDB to 80%. CloudMonitor sends an alert notification when the CPU usage of an ApsaraDB for MongoDB instance exceeds 80%. If you set the Resource Range parameter to All Resources, the alert rule is applied to up to 1,000 instances. If the specified service has more than 1,000 instances, you may not receive alert notifications when the value of the specified metric reaches the threshold. We recommend that you add resources to service-specific application groups before you create alert rules.
      • Instance: The alert rule is applied to a specific instance. Assume that you set the Resource Range parameter to Instances and the alert threshold for the CPU usage of an ECS instance to 80%. CloudMonitor sends an alert notification when the CPU usage of the ECS instance exceeds 80%.
      Alarm Rule The name of the alert rule.
      Rule Description The content of the alert rule. This parameter defines the conditions that trigger an alert. For example, if you set the condition to that the average CPU usage in 5 minutes is greater than or equal to 90%, CloudMonitor checks whether the condition is met every 5 minutes.
      Take host monitoring as an example. A data point on the metric of a single host is reported at a 15-second interval. Therefore, 20 data points are reported in 5 minutes. CloudMonitor checks whether conditions are met based on the following rules:
      • If the average value of the 20 data points on CPU usage reported in 5 minutes is greater than 90%, the average CPU usage in 5 minutes is greater than 90%.
      • If the values of all the 20 data points on CPU usage reported in 5 minutes are greater than 90%, the CPU usage in 5 minutes is always greater than 90%.
      • If the value of at least one of the 20 data points on CPU usage reported in 5 minutes is greater than 90%, the CPU usage in 5 minutes is greater than 90% for once.
      • If the sum of the values of the 20 data points on outbound traffic over Internet reported in 5 minutes is greater than 50 MB, the total outbound traffic over Internet in 5 minutes is greater than 50 MB.
      Mute for The interval of re-sending the notification for an alert before the alert is cleared.
      Effective Period The time period during which the alert rule is effective. CloudMonitor only checks whether monitoring data meets the alert rule during the effective period.
      Notification Contact The alert groups to which alert notifications are sent.
      Notification Methods

      Email + DingTalk (Info)

      Email Remark Optional. The custom additional information included the alert notification email.
      HTTP Callback The callback URL that can be accessed over the Internet. CloudMonitor pushes an alert notification to the specified callback URL by sending an HTTP Post request. Only the HTTP protocol is supported.
    4. Click Confirm.