You can save alert rules for commonly used cloud product metrics to an alert template, and save collections of alert targets to an object group. When the resource types of an alert template and an object group overlap, Cloud Monitor will automatically generate the corresponding alert policies.
Only when the resource types of an alert template and an object group overlap will Cloud Monitor automatically generate an alert policy.
Since alert templates and object groups are independent of each other, the impact of editing a configured alert template or object group on existing alert policies is shown in the following table.
When you delete a configured alert template or object group, the impact on already generated alert policies is shown in the following table.
Step 1: Create an alert template
An alert template is a template that saves alert rules for various cloud product metrics, so that you can quickly create alert policies.
- In the left navigation bar, click Alert Center > Alert Template.
- Click Create alert template.
- On the Create alert template page, complete the following configuration, then click Create.
tip
An alert template supports multiple cloud products and multiple dimensions.
Step 2: Create an object group
An object group is a collection of alert targets. It can contain instances of multiple products across multiple regions, and is applied to alert templates to define the scope of alert resources.
- In the left navigation bar, click Object Group.
- On the Object group list page, click Create object group.
- On the Create object group page, finish configuration and then click Create.
Step 3: Apply the alert template to the group
When the resource types of an alert template and an object group overlap, you can apply the template to the group. Cloud Monitor will then automatically generate the corresponding alert policies based on the intersecting resource types and dimensions.
warning
An Object group can only be bound to one alert template.
- In the left navigation bar, click Alert center > Alert policy.
- In the alert template list, find the target alert template and click Apply to Group in the Actions column on its right.
- In the Apply alert template to object group pop-up window, click Add object group.
- Expand the added object group, select the created object group and notification channel, then click Apply.
- In the alert policy list, view the alert policy name.
- When the resource types in an alert template and an object group overlap, Cloud Monitor automatically generates alert policies based on the common resource types and dimensions. The generated policies will be named in the format {Alert Rule Name}&{Object Group Name}, i.e., RuleForEcs&Group in this document.
tip
Alert policies generated from an alert template do not support editing or deletion. They only support enabling and disabling.