All Products
Search
Document Center

:Create custom alert monitoring rule templates

Last Updated:Jun 20, 2026

Simple Log Service lets you create custom alert monitoring rule templates and use them across regions. This topic describes how to create and manage these templates.

Prerequisites

You have created an alert monitoring rule. For more information, see Create an alert monitoring rule.

Background

If you write the same type of business data to Logstores in different projects, you can use an alert monitoring rule template to monitor all the data with a single, reusable rule. This lets you apply and update the rule flexibly. Before you use a template, make sure it meets the monitoring requirements for your data.

If you only need to copy an alert monitoring rule for one-time use, you can use the rule copy feature. The following table compares the features and use cases of custom alert monitoring rule templates and the rule copy feature.

Note

In this topic, a resource is a project, a Logstore, or a Metricstore.

Feature

Key features

Use cases

Custom alert monitoring rule template

  • Associate with resources across different projects.

  • Updates to the template apply to all associated resources.

  • View all resources associated with the template.

  • Delete all alerts generated from the template in one operation.

Monitor multiple resources with a single rule. Updates to the rule apply to all associated resources.

Rule copy

  • Copy rules across projects.

  • Updates or deletions affect only the individual copied rule.

Copy an alert monitoring rule to other resources for independent configuration.

Limitations

  • If an alert monitoring rule contains more than one query statement, you cannot convert it to a template.

  • Creating alert monitoring rule templates may involve operations across different projects. If you use a RAM user, ensure the RAM user has the necessary permissions to manage alerts in the target projects. For more information, see Grant a RAM user permissions to manage alerts.

Procedure

  1. Log on to the Simple Log Service console.

  2. In the Projects section, click the project you want.

  3. In the left-side navigation pane, click Alerts.

  4. On the Alert Rules tab, find the desired rule and click Convert to Template in the Actions column.

    image

  5. In the Add Simple Log Service Resource dialog box, select the target resources, and then click OK.

    The alert monitoring rule is converted into a template and synchronized with your selected projects to monitor the specified Logstores or Metricstores. In the rule list, the rule's Type changes to Template Alert.

    Important
    • If the association fails for all selected resources during the conversion, the template is not created, and the original alert monitoring rule remains unchanged.

    • If the association fails for some of the selected resources, the template is still created, but the original alert monitoring rule is deleted. The new template monitors only the successfully associated resources.

Related operations

Edit template

  1. On the Alert Rules tab, find the desired template and click Edit in the Actions column.

  2. In the Edit Alert panel, modify the template settings.

Delete template

  1. On the Alert Rules tab, find the desired template and click Delete in the Actions column.

  2. In the Confirm dialog box, click Confirm.

    Important
    • When you delete a template, all alerts created from that template are also deleted and cannot be recovered. Proceed with caution.

    • Deleting a template attempts to disassociate it from all resources. If this process fails for a resource, its corresponding alert monitoring rule is not deleted.