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. CloudMonitor monitors these instances based on the configured alert rules.

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 Alert Notification Information Language parameter is set to the default value Automatic.
      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 of the alert contact.
      By default, the email address of the alert contact is in the Pending Activation state. After the alert contact receives an email that contains the activation link, the alert contact must activate the email address within 24 hours. Otherwise, the alert contact cannot receive alert notifications. After the email address is activated, you can view the email address 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 Group tab, click Create Application Group in the upper-right corner.
    3. In the Create Application Group panel, set the Creation Method parameter to Create Based on Instance Name, set the Application Group Name parameter to InventoryManagementOnlineEnvironment, and set the Alert Contact Group parameter to InventoryManagementAlertGroup. In the Dynamically Add Instances section, configure the rules are used to dynamically match the names of ECS, ApsaraDB RDS, and SLB instances.
    4. Click OK.
  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.
    3. In the Create/Modify Alert Template panel, set the Template Name parameter to E-commerceBackgroundModuleTemplate, and configure alert rules for ECS, ApsaraDB RDS, and SLB instances.
    4. Click OK.
    5. In the Alert Template Created/Modified message, click OK.
    6. In the Apply Templates to Groups dialog box, select InventoryManagementOnlineEnvironment from the Select Groups drop-down list. Then, set the Mute For, Effective From, Alert Callback, and Priority parameters.
    7. Click Confirm.
    8. In the Apply Templates to Groups message, click Confirm.
  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 Group tab, click the name of the application group that you want to manage.
    3. In the left-side navigation pane, click Group Resources.
      You can view the health status of each instance that matches the alert rules in the application group.

      If an instance has not triggered alerts, the Health Status column of the instance shows Normal. If an instance has triggered alerts, the Health Status column of the instance shows Alerting.