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
Create an alert contact.
Log on to the CloudMonitor console.
In the left-side navigation pane, choose .
On the Alert Contacts tab, click Create Alert Contact.
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.
NoteAutomatic indicates that CloudMonitor automatically selects the language of alert notifications based on the language that you use to create your Alibaba Cloud account.
Optional. Test the connectivity of the webhook URL.
If you want to test the connectivity of the webhook URL, perform the following steps:
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.
NoteTo obtain the details of the test result, configure the Test Template Type and Language parameters and click Test.
Click Close.
Confirm the parameter settings and click OK.
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.
Create an alert contact group. For example, you can create a group named InventoryManagementAlertGroup.
On the Alert Contacts page, click the Alert Contact Group tab.
On the Alert Contact Group tab, click Create Alert Contact Group.
In the Create Alert Contact Group panel, enter a name for the alert contact group and add alert contacts to the alert contact group.
Click Confirm.
Create an application group. For example, you can create an application group named InventoryManagementOnlineEnvironment.
In the left-side navigation pane, click Application Groups.
On the Application Groups tab, click Create Application Group in the upper-left corner.
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.
Click OK.
Create an alert template and apply it to an application group. For example, you can create an alert template named E-commerceBackgroundModuleTemplate.
In the left-side navigation pane, choose .
On the Alert Templates page, click Create Alert Template.
In the Create Alert Template panel, set Template Name to E-commerceBackgroundModuleTemplate, and configure alert rules for ECS, ApsaraDB RDS, and SLB instances.
Click OK.
In the Alert Template Created/Modified message, click Confirm.
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.
Click Confirm.
In the Apply Templates to Groups message, click Confirm.
View the health status of each instance that matches the alert rules in the application group.
In the left-side navigation pane, choose
.On the Application Groups tab, click the name of the application group.
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 .