If your Alibaba Cloud account has a large number of cloud resources, you can manage these cloud resources by using application groups. To configure an alert rule for multiple application groups, you can create an alert template.

Background information

This topic describes how to configure alert rules for Elastic Compute Service (ECS), ApsaraDB RDS, and Server Load Balancer (SLB) instances by using alert templates and application groups. This way, a CloudMonitor alert system is created.

Procedure

  1. Create an alert contact.
    1. Log on to the CloudMonitor console.
    2. In the left-side navigation pane, choose Alerts > Alert Contacts.
    3. On the Alert Contacts tab, click Create Alert Contact.
    4. In the Set Alert Contact panel, enter the name, email address, and DingTalk chatbot of the alert contact, and make sure that the default value Automatic is specified for the Alert Notification Information Language parameter.
      Note Automatic indicates that CloudMonitor automatically selects the language of alert notifications based on the language that you use to create your Alibaba Cloud account.
    5. Verify the parameters and click OK.
    6. Optional. Activate the email address and mobile phone number of the alert contact.
      By default, the email address and mobile phone number of the alert contact are in the Pending Activation state. After the alert contact receives an email or a text message that contains the activation link, the alert contact must activate the email address and mobile phone number within 24 hours. Otherwise, the alert contact cannot receive alert notifications. After the email address and mobile phone number are activated, you can view the email address and mobile phone number in the alert contact list.
  2. Create an alert contact group. For example, you can create a group named InventoryManagementAlertGroup.
    1. On the Alert Contacts page, click the Alert Contact Group tab.
    2. On the Alert Contact Group tab, click Create Alert Contact Group.
    3. In the Create Alert Contact Group panel, enter a name for the alert contact group and add alert contacts to the alert contact group.
    4. Click Confirm.
  3. Create an application group. For example, you can create an application group named InventoryManagementOnlineEnvironment.
    1. In the left-side navigation pane, click Application Groups.
    2. On the Application Groups page, click Create Group in the upper-right corner.
    3. In the Create Group panel, set the Creation Method parameter to Smart Instance Rule Creation, the Product Group Name parameter to InventoryManagementOnlineEnvironment, and the Contact Group parameter to InventoryManagementAlertGroup. Then, configure the required rules for ECS, ApsaraDB RDS, and SLB instances in the Add Instance dynamically section. These rules are used to dynamically match the names of these instances.
      Create an application group
    4. Click Create Application Group.
  4. Create an alert template and apply it to an application group. For example, you can create an alert template named E-commerceBackgroundModuleTemplate.
    1. In the left-side navigation pane, choose Alerts > Alert Templates.
    2. On the Alert Templates page, click Create Alert Template in the upper-right corner.
    3. In the Create/modify alert templates panel, set the Template Name parameter to E-commerceBackgroundModuleTemplate, and configure alert rules for ECS, ApsaraDB RDS, and SLB instances.
      Basic information
    4. Click OK.
    5. In the Create/modify alert template complete message, click OK.
    6. In the Apply Template to Group dialog box, select InventoryManagementOnlineEnvironment in the Select a group field. Then, set the Muted, Effective Period, HTTP Callback, and Option parameters.
    7. Click OK.
    8. In the Apply Template to Group message, click OK.
  5. View the health status of each instance that matches the alert rules in the application group.
    1. In the left-side navigation pane, click Application Groups.
    2. On the Application grouping tab, find the required application group and click its name or ID in the Group Name / Group ID column.
    3. In the Group Instances section, view the health status of each instance.
      If no alerts are triggered based on the alert rules that are created for the instances, the Health Status parameter is set to OK. If an alert is triggered, the Health Status parameter is set to Alert Status.