Help Center/ Cloud Eye/ Best Practices/ Cloud Resource Monitoring/ Configuring Alarm Rules for Resources by Matching Tags
Updated on 2026-07-24 GMT+08:00

Configuring Alarm Rules for Resources by Matching Tags

If you have configured alarm rules for all resources of a cloud product but later need to adjust thresholds for specific resources, creating new rules can take too much effort. You can group resources of specific tags and link these groups to alarm templates to generate rules automatically. To update thresholds of resources, simply change their tags.

Prerequisites

  • You have configured a tag for all resources of a cloud product.
  • You have configured another tag for the resources whose thresholds need to be adjusted.

Creating a Resource Group for All Resources

  1. Log in to the Cloud Eye console.
  1. In the navigation pane, choose Resource Groups.
  2. On the Resource Groups page, click Create Resource Group.
    Figure 1 Creating a resource group for all resources
  3. Set parameters according to Table 1.
    Table 1 Creating a resource group for all resources

    Parameter

    Example Value

    Description

    Name

    ECS-All-Resources

    Name of the resource group. The value can contain 1 to 128 characters and can only contain letters, digits, underscores (_), and hyphens (-).

    Add Resources

    Automatically

    Method of adding or matching resources to a resource group.

    Match Resources By

    Tag

    How resources are added to a resource group.

    Resource Level

    Cloud product

    Resource level of the monitored object. You can select Cloud product or Specific dimension.

    If you select Cloud product, you need to select a cloud product.

    If you select Specific dimension, all available resources in the selected dimensions will be automatically added to this resource group. For details, click View monitored dimensions.

    Cloud Product

    Elastic Cloud Server-ECSs

    If Resource Level is set to Cloud service, you need to select the cloud service that the resources belong to. You can select one or more cloud services.

    If Cloud Product is set to All, all cloud products that are interconnected with Cloud Eye will be selected.

    Matching Rule

    status Equal 1

    Tag matching rule. You can add up to 50 tags. Tags are key-value pairs that you can use to easily categorize and search for cloud resources.

    • Resource Tag Key: A tag key cannot start or end with a space, or start with _sys_. It can contain up to 128 characters and contain letters, digits, spaces, and these special characters: _.:=+-@
    • Resource Tag Value: A tag value consists of the matching method and value. The matching method can be set to Equal, All, Include, Prefix, Suffix, or Not include. A tag value can contain up to 255 characters and contain letters, digits, spaces, and these special characters: _.:/=+-@
    NOTE:

    If you enter multiple tags, the relationship between different keys is AND, and the relationship between values of the same key is OR.

    Enterprise Project

    default

    Enterprise project that the resource group belongs to.

  4. Configure alarm notification parameters.
  5. Click Create.

Creating a Resource Group for Resources Whose Thresholds Need to Be Adjusted

  1. Log in to the Cloud Eye console.
  1. In the navigation pane, choose Resource Groups.
  2. On the Resource Groups page, click Create Resource Group.
  3. Set parameters according to Table 2.
    Table 2 Creating a resource group by matching resources by tag

    Parameter

    Example Value

    Description

    Name

    ECS-Threshold-Adjustment

    Name of the resource group. The value can contain 1 to 128 characters and can only contain letters, digits, underscores (_), and hyphens (-).

    Add Resources

    Automatically

    Method of adding or matching resources to a resource group.

    Match Resources By

    Tag

    How resources are added to a resource group.

    Resource Level

    Cloud product

    Resource level of the monitored object. You can select Cloud product or Specific dimension.

    If Resource Level is set to Cloud product, you need to select a cloud product.

    If you select Specific dimension, all available resources in the selected dimensions will be automatically added to this resource group. For details, click View monitored dimensions.

    Cloud Product

    Elastic Cloud Server-ECSs

    If Resource Level is set to Cloud service, you need to select the cloud service that the resources belong to. You can select one or more cloud services.

    If Cloud Product is set to All, all cloud products that are interconnected with Cloud Eye will be selected.

    Matching Rule

    status Equal 0

    Tag matching rule. You can add up to 50 tags. Tags are key-value pairs that you can use to easily categorize and search for cloud resources.

    • Resource Tag Key: A tag key cannot start or end with a space, or start with _sys_. It can contain up to 128 characters and contain letters, digits, spaces, and these special characters: _.:=+-@
    • Resource Tag Value: A tag value consists of the matching method and value. The matching method can be set to Equal, All, Include, Prefix, Suffix, or Not include. A tag value can contain up to 255 characters and contain letters, digits, spaces, and these special characters: _.:/=+-@
    NOTE:

    If you enter multiple tags, the relationship between different keys is AND, and the relationship between values of the same key is OR.

    Enterprise Project

    default

    Enterprise project that the resource group belongs to.

  4. Configure alarm notification parameters.
  5. Click Create.

Creating a Custom Alarm Template

  1. Log in to the Cloud Eye console.
  1. In the navigation pane, choose Alarm Management > Rule Settings.
  2. Click the Alarm Templates tab.

    In some regions, the path is Alarm Management > Alarm Templates.

  3. Click Create Custom Template and set parameters according to Table 3.
    Figure 2 Setting alarm template parameters
    Table 3 Setting alarm template parameters

    Parameter

    Example Value

    Description

    Name

    ECS-General-Alarm

    Custom template name. The system generates a random name, which you can modify.

    Description

    Alarm template applicable to all ECS resources

    (Optional) Supplementary information about the custom template.

    Alarm Type

    Metric

    Alarm type to which the alarm template applies.

    Method

    Configure manually

    You can select Use existing template or Configure manually.

    • Use existing template: You can select one or more existing templates. If you select multiple existing templates, the metric information is distinguished by resource type.
    • Configure manually: You can customize alarm policies as required.

    Add Resource Type

    Elastic Cloud Server

    Type of the resources the alarm template is created for.

    NOTE:

    Up to 50 resource types can be added for each service.

    Alarm Policy

    If the raw data of CPU usage in three consequent periods is 80% or more, Cloud Eye triggers a critical alarm once a day.

    Policy for triggering an alarm.

    When you set Alarm Type to Metric, whether to trigger an alarm depends on whether the data in consecutive periods reaches the threshold. For details, see Alarm Policies.

    NOTE:

    You can add up to 50 alarm policies to an alarm rule. If any of these alarm policies are met, an alarm will be triggered.

    Operation

    Copy

    You can copy or delete an added alarm policy.

  4. Click Create.
  5. In the custom metric template list, locate the alarm template created in the preceding steps, and choose More > Copy in the Operation column.
  6. On the Copy Template page, enter the template name and description.
    • Template Name: ECS-Threshold-Adjustment
    • Description: Alarm template for adjusted ECS resource thresholds
  7. Click OK.
  8. Locate the copied alarm template and click Modify in the Operation column.
  9. On the Modify Custom Metric Template page, modify the thresholds in the alarm policy.
  10. Click Modify.

Associating an Alarm Template with a Resource Group

  • The new page of associating resource groups is now available in some regions. This feature will expand to other regions soon. For details, check the console.
  • This section describes the procedure on the new page. For details about the procedure on the earlier page, see Associating a Custom Metric Template with a Resource Group.
  1. Log in to the Cloud Eye console.
  1. In the navigation pane, choose Alarm Management > Rule Settings.
  2. Click the Alarm Templates tab.

    In some regions, the path is Alarm Management > Alarm Templates.

  3. Click the Custom Metric Templates tab.
  4. Locate the template ECS-General-Alarm and click Associate with Resource Group in the Operation column.
  5. Set Resource Groups to the resource group ECS-All-Resources and determine whether to inherit the notification type configured for the resource group.
    • If Inherit Notification Settings from the Resource Group is set to Yes, the alarm rules will inherit the notification type from the resource group. If a resource group has no notification type configured, the alarm rules will not have one either.
    • If it is set to No, all associated alarm rules will not inherit the notification type from the resource group. Alarm Notifications in new alarm rules will be disabled, and the associated alarm rules will use existing alarm notification settings.
  6. Click OK.

    This operation requires asynchronous creation, modification, and deletion of alarm rules, which takes 5 to 10 minutes. If there are multiple association tasks, this process takes longer.

  7. In the Modified dialog box, view the names of updated alarm rules and click OK.
  8. Repeat steps 5 to 8 to associate the alarm template ECS-Threshold-Adjustment with the resource group ECS-Threshold-Adjustment.
    After the association, you can view the created alarm rules in the alarm rule list.
    Figure 3 Alarm rules

Managing Resource Tags

After creating alarm rules, if you want to adjust the alarm threshold of a resource, you only need to modify its tag to match it to the alarm rule with the new threshold. For details about how to modify resource tags, see .