Help Center/ Cloud Eye/ User Guide/ Alarm Management/ Alarm Templates/ Associating a Custom Metric Template with a Resource Group
Updated on 2026-06-18 GMT+08:00

Associating a Custom Metric Template with a Resource Group

By associating a custom metric template with a resource group, you can create alarm rules for different resources in batches. If you have many cloud resources, you are advised to create resource groups by service application, create alarm templates, and associate resource groups with the alarm templates to create alarm rules in batches. This simplifies and speeds up rule creation and maintenance. After the association, corresponding alarm rules will be generated. Any changes to the templates will update all related alarm policies.

Billing

Alarm notifications sent by SMN will be billed based on their frequency and message length. For details, see Product Pricing Details.

Constraints

Only custom metric alarm templates can be associated with resource groups.

Prerequisites

Procedure

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.

  1. Log in to the Cloud Eye console.
  1. In the navigation pane, choose Alarm Management > Alarm Templates.
  2. Click the Custom Metric Templates tab.
  3. Locate the target template and click Associate with Resource Group in the Operation column.
  4. Check whether the selected region supports the new page of resource group association.
    • If no, perform 6 to 9.
    • If yes, perform 10 to 12.
  5. On the Associate with Resource Group page, select the resource group to be associated.
    Figure 1 Associating with a resource group
  6. Configure alarm notifications.

    Notification policies and templates are available only in the CN-Hong Kong region. They will be available in other regions later.

    Figure 2 Configuring alarm notifications
    Table 1 Configuring alarm notifications

    Parameter

    Description

    Example Value

    Alarm Notifications

    Whether to send alarm notifications by SMS, email, FunctionGraph (function), FunctionGraph (Workflow), WeCom, DingTalk, Lark, WeLink, HTTP, or HTTPS. This parameter is enabled by default.

    Enabled

    Notified By

    Notification method. You can select Notification policies, Notification groups, or Topic subscriptions.

    • Notification policies: If several O&M owners handle service maintenance, you can set up different notification scopes in a notification policy to alert specific owners by alarm severity or at a specified schedule. For details, see Creating a Notification Policy.
    • Notification groups: You can create a notification group and add recipients to the group to centrally send them alarm notifications. Choose this option if you need to send alarm notifications to specified recipients. For details about how to create a notification group, see Creating a Recipient and Notification Group.
    • Topic subscriptions: If the current region does not support alarm notifications or the recipients have been configured in SMN, you can select a topic created in SMN or your cloud account contact as required.

      For details, see Creating a Topic and Adding Subscriptions.

    NOTE:

    Cloud Eye uses SMN for alarm notifications. If SMN has major delays, the alarm notifications may also be delayed.

    Notification groups

    Notification Policies

    If Notified By is set to Notification policies, you need to select one or more notification policies. You can specify the notification group, window, template, and other parameters in a notification policy. For details, see Creating, Modifying, or Deleting a Notification Policy.

    -

    Notification Group

    Notification group to which alarm notifications are sent. This parameter is available when Notified By is set to Notification groups. For details, see Creating a Recipient and Notification Group.

    -

    Recipient

    Target recipient of alarm notifications. You can select the account contact or a topic. This parameter is available only if Notified By is set to Topic subscriptions. If there is a display name of a topic, the format is Topic name (Display name), and you can search for a topic by name or display name. If no display name is set for a topic, only the topic name will be displayed.

    • The account contact is the mobile number and email address of the registered account.
    • A topic is used to publish messages and subscribe to notifications. If there is no topic you need, create one first and add subscriptions to it. For details, see Creating a Topic and Adding Subscriptions.

    Account contact

    Notification Window

    If Notified By is set to Notification groups or Topic subscriptions, you need to set the notification window.

    Cloud Eye sends notifications only within the validity period specified in the alarm rule.

    If you set this parameter to 08:00 to 20:00, Cloud Eye only sends notifications within this period.

    08:00-20:00

    Time Zone

    Time zone for the alarm notification window. By default, it matches the time zone of the client browser, but can be manually configured.

    (GMT+08:00) Beijing, Chongqing, Hong Kong, Urumqi, Kuala Lumpur, Singapore, Perth, Taipei, Irkutsk, Ulaanbaatar

    Trigger Condition

    This parameter is required when you set Notified By to Notification groups or Topic subscriptions. Condition that will trigger an alarm notification. You can select Generated alarm (when an alarm is generated), Cleared alarm (when an alarm is cleared), or both.

    Generated alarm

    Notification Template

    This parameter is only available if you set Notified By to Notification groups or Topic subscriptions. You can select an existing template or create one to send alarm notifications.

    NOTE:

    Some cloud services do not support fields such as the resource name, enterprise project, resource tag, private IP address, and public IP address in the notification template. When you select a system template as the notification template, these fields will appear blank in the alarm notifications even if you have them configured.

    -

  7. Select an enterprise project.
    Figure 3 Advanced settings
    Table 2 Parameter of Advanced Settings

    Parameter

    Description

    Example Value

    Enterprise Project

    Enterprise project that the alarm template belongs to. Only users who have all permissions for the enterprise project can manage the alarm template. For details about how to create an enterprise project, see Creating an Enterprise Project.

    default

  8. 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.

  9. On the Associate with Resource Group page, select the target resource group and determine whether the alarm rules will inherit the notification type from the resource group.
    • If Inherit Notification Settings from the Resource Group is set to Yes, all alarm rules created through the association 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 alarm rules created through the association 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.
    Figure 4 Associating with a resource group
  10. 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.

  11. In the Modified dialog box, view the names of updated alarm rules and click OK.

    After the resource group is associated, it appears in the Resource Groups Associated column of the custom metric template list.