All Products
Search
Document Center

CloudMonitor:Configure alert rules for application groups by using alert templates

Last Updated:Mar 27, 2024

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 webhook URL of the alert contact. Make sure that the Language of Alert Notifications 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. Optional. Test the connectivity of the webhook URL.

      If you want to test the connectivity of the webhook URL, perform the following steps:

      1. Click Test next to the webhook URL.

        In the Webhook Test panel, you can check and troubleshoot the connectivity of the webhook URL based on the returned status code and test result details.

        Note

        To obtain the details of the test result, configure the Test Template Type and Language parameters and click Test.

      2. Click Close.

    6. Confirm the parameter settings and click OK.

    7. 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 Groups tab, click Create Application Group in the upper-left corner.

    3. In the Create Application Group panel, set Creation Method to Create Based on Instance Name, set Application Group Name to InventoryManagementOnlineEnvironment, and set Alert Contact Group to InventoryManagementAlertGroup. In the Dynamically Add Instances section, configure the rules that 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 Alert Template panel, set Template Name 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 Confirm.

    6. In the Apply Templates to Groups dialog box, select InventoryManagementOnlineEnvironment from the Select Groups drop-down list. Then, configure the Mute For, Effective Period, 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, choose Cloud Service Monitoring > Application Groups.

    2. On the Application Groups tab, click the name of the application group.

    3. In the left-side navigation pane, click Group Resources.

      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 正常. If an instance has triggered alerts, the Health Status column of the instance shows 报警.