All Products
Search
Document Center

Tablestore:Configure alert rules for metrics

Last Updated:Oct 21, 2024

You can configure alert rules for metrics in the CloudMonitor console. If the conditions that are specified in an alert rule are met, CloudMonitor automatically notifies you of anomalies in the monitoring data. This way, you can troubleshoot errors at the earliest opportunity.

Prerequisites

An alert contact group is created. For more information, see Create an alert contact.

Create alert rules

Create multiple alert rules at the same time

You can apply an alert template to an application group to which product resources are added. This way, you can create alert rules for multiple Tablestore instances in the application group at the same time.

Step 1: Create an application group and add product resources to the application group

The application group feature allows you to manage resources from different services and regions by group. You can create application groups based on your business requirements. You can add resources that are related to the same business to an application group. You can also manage alert rules by application group.

  1. Log on to the CloudMonitor console.

  2. Create an application group.

    1. In the left-side navigation pane, click Application Groups.

    2. On the Application Groups tab, click Create Application Group.

    3. In the Create Application Group panel, set Creation Method to Manually Create, specify the application group name and alert contact group, and retain the default settings for other parameters.

      By default, Receive Event Notifications is turned on. If Receive Event Notifications is turned on, CloudMonitor automatically notifies the alert contacts in the alert contact group when important system events occur on the instances in the application group.

    4. Click OK.

  3. Add product resources to the application group.

    1. On the Group Resources page of the application group, click Manage Services and Resources.

    2. In the Add/Modify Group Resources panel, select Tablestore for Associated Cloud Services and select a Tablestore instance.

    3. Click Ok.

      On the Group Resources page of the application group, you can view the information about the cloud service and instance that you added.

  4. On the Group Resources page of the application group, click the 返回 icon to return to the Application Groups page.

    On the Application Groups tab, you can view the application group that you create.

Step 2: Create an alert template and apply the template to the group

  1. Log on to the CloudMonitor console.

  2. In the left-side navigation pane, choose Alerts > Alert Templates.

  3. On the Alert Templates page, click Create Alert Template.

  4. In the Create Alert Template panel, configure template parameters.

    1. Enter a template name and select Tablestore for Select Alibaba Cloud Service.

    2. Click Add Rule, configure the parameters on the Metric Template tab, and click OK. The following table describes the parameters.

      You can configure parameters only on the Metric Template tab for Tablestore. You can add multiple rules based on your business requirements.

      Parameter

      Description

      Rule Name

      The name of the threshold-triggered alert rule.

      Metric Type

      The metric type of the threshold-triggered alert rule. Valid values:

      • Single Metric: The alert rule applies to only one metric.

      • Multiple Metrics: The alert rule applies to multiple metrics.

      Metric Name

      The name of the metric that you want to monitor. For information about how to obtain the metrics for an Alibaba Cloud service, see Appendix 1: Metrics.

      Note

      This parameter is displayed only if you set the Metric Type parameter to Single Metric.

      Threshold and Alert Level

      The alert level and the corresponding threshold.

      The notification method for alerts of the Info level is Email + Webhook.

      You also need to select the number of times that the metric to be monitored reaches the alert threshold before an alert notification is sent. Valid values: 1 Consecutive Cycles, 3 Consecutive Cycles, 5 Consecutive Cycles, 10 Consecutive Cycles, 15 Consecutive Cycles, 30 Consecutive Cycles, 60 Consecutive Cycles, 70 Consecutive Cycles, 90 Consecutive Cycles, 120 Consecutive Cycles, and 180 Consecutive Cycles.

      Note

      This parameter is displayed only if you set the Metric Type parameter to Single Metric.

      Alert Level

      The alert level and the corresponding alert notification methods. Valid values:

      Info: Email + Webhook

      Note

      This parameter is displayed only if you set the Metric Type parameter to Multiple Metrics.

      Metric Type

      The method that you want to use to specify metrics and conditions. Valid values:

      • Standard Creation: Select multiple metrics and specify conditions.

      • Expression-based Creation: Enter an expression to specify multiple metrics and conditions.

      Note

      This parameter is displayed only if you set the Metric Type parameter to Multiple Metrics.

      Multi-metric Alert Condition

      The alert rule that is created for multiple metrics.

      Note

      This parameter is displayed only if you set the Metric Type parameter to Multiple Metrics and the Metric Type parameter to Standard Creation.

      Relationship Between Metrics

      The relationship between multiple metrics. Valid values:

      • Generate alerts if all metrics meet the conditions (&&)

      • Generate alerts if one of the conditions is met (||)

      Note

      This parameter is displayed only if you set the Metric Type parameter to Multiple Metrics and the Metric Type parameter to Standard Creation.

      Multi-metric Alert Expression

      The expression that is used to specify multiple metrics and conditions.

      For more information about how to configure multi-metric alert rule expressions, see Alert rule expressions.

      Note

      This parameter is displayed only if you set the Metric Type parameter to Multiple Metrics and the Metric Type parameter to Expression-based Creation.

      Select the number of times the threshold is reached before an alert is triggered

      The number of consecutive triggers. If the number of times that the metric values meet the trigger conditions reaches the value of this parameter, CloudMonitor sends alert notifications. Valid values: 1 Consecutive Cycles, 3 Consecutive Cycles, 5 Consecutive Cycles, 10 Consecutive Cycles, 15 Consecutive Cycles, 30 Consecutive Cycles, 60 Consecutive Cycles, 70 Consecutive Cycles, 90 Consecutive Cycles, 120 Consecutive Cycles, and 180 Consecutive Cycles.

      Note

      This parameter is displayed only if you set the Metric Type parameter to Multiple Metrics.

      Method to handle alerts when no monitoring data is found

      The method that is used to handle alerts when no monitoring data is found. Valid values:

      • Do not do anything

      • Send alert notifications

      • Treated as normal

      Tag

      The tags of the alert template. The specified tags are automatically added to the alert content.

      Alert Callback

      The callback URL that can be accessed over the Internet. CloudMonitor sends HTTP POST requests to push alert notifications to the specified URL. For more information about how to configure an alert callback, see Use the alert callback feature to send notifications about threshold-triggered alerts.

      To test the connectivity of an alert callback URL, perform the following steps:

      1. Click Test next to the callback URL.

        In the Webhook Test panel, you can check and troubleshoot the connectivity of the alert callback URL based on the returned status code and test result details.

        Note

        To obtain the details of the test result, configure the Test Template Type and Language parameters and click Test.

      2. Click Close.

    3. Click OK.

  5. Apply the alert template to the application group.

    1. In the Alert Template Created/Modified message, click OK.

      Note

      If you click Cancel, the alert template is created but not applied to the application group. For more information, see Apply alert templates to application groups.

    2. In the Apply Templates to Groups dialog box, select one or more application groups, configure the Mute For, Effective Period, Alert Callback, Priority, and Template Application Policy parameters, and click OK.

    3. In the Apply Templates to Groups message, click OK.

      Important

      After the template is applied to the application groups, a specific period of time is required for the alert rules to be created.

Create an alert rule

To monitor the usage of a Tablestore instance, create an alert rule for the instance.

  1. Log on to the CloudMonitor console.

  2. In the left-side navigation pane, choose Alerts > Alert Rules.

  3. On the Alert Rules page, click Create Alert Rule.

  4. In the Create Alert Rule panel, configure the parameters and click Confirm. The following table describes the parameters.

    Parameter

    Description

    Product

    The name of the Alibaba Cloud service that can be monitored by CloudMonitor. For example, you can select ApsaraDB RDS.

    Resource Range

    The range of the resources to which the alert rule applies. Valid values:

    • All Resources: The alert rule applies to all resources of the specified cloud service.

    • Application Groups: The alert rule applies to all resources in the specified application group of the specified cloud service.

    • Instances: The alert rule applies to the specified resources of the specified cloud service.

    Rule Description

    The content of the alert rule. The parameters in this section specify the conditions that trigger an alert. To specify the rule description, perform the following steps:

    1. Click Add Rule and select a metric type from the drop-down list.

    2. In the Configure Rule Description panel, enter a rule name in the Alert Rule field and configure the Metric Type parameter. Valid values of the Metric Type parameter:

      • Simple Metric: Select a metric and set the threshold and alert level for the metric.

      • Combined Metrics: Select an alert level and specify alert conditions for two or more metrics in the Multi-metric Alert Condition section.

        Note

        If a multi-metric alert rule is configured, the desired resource must have data on each metric. An alert can be triggered only if the related conditions are met. For example, if a multi-metric alert rule includes Internet metrics but the ECS instance is not configured with an elastic IP address (EIP), alerts cannot be triggered.

      • Expression: Select an alert level and then configure an alert expression.

      • Dynamic Threshold: For more information about dynamic thresholds, see Overview and Create dynamic threshold-triggered alert rules.

        Note

        The dynamic threshold feature is in invitational preview. To use the feature, you must submit a ticket.

    3. Click OK.

    Note

    For more information about how to specify complex alert conditions, see Alert rule expressions.

    Mute For

    The interval at which CloudMonitor resends alert notifications before an alert is cleared. Valid values: 5 Minutes, 15 Minutes, 30 Minutes, 60 Minutes, 3 Hours, 6 Hours, 12 Hours, and 24 Hours.

    If a metric value reaches the threshold, CloudMonitor sends an alert notification. If the metric value reaches the threshold again within the mute period, CloudMonitor does not resend an alert notification. If the alert is not cleared after the mute period ends, CloudMonitor resends an alert notification.

    For example, if the Mute For parameter is set to 12 Hours and the alert is not cleared, CloudMonitor resends an alert notification after 12 hours.

    Effective Period

    The period during which the alert rule is effective. CloudMonitor sends alert notifications based on the alert rule only within the effective period.

    Note

    If an alert rule is not effective, no alert notification is sent. However, the alert history is still displayed on the Alert History page.

    Alert Contact Group

    The alert contact groups to which alert notifications are sent.

    The alert notifications of the application group are sent to the alert contacts that belong to the selected alert contact groups. An alert contact group can contain one or more alert contacts.

    For more information about how to create an alert contact and an alert contact group, see Create an alert contact or alert contact group.

    Tag

    The tag of the alert rule. A tag consists of a tag key and a tag value.

    Note

    You can set a maximum of six tags.

    Alert Callback

    The callback URL that can be accessed over the Internet. CloudMonitor sends HTTP POST requests to push alert notifications to the specified URL. Only HTTP requests are supported. For more information about how to configure alert callback, see Use the alert callback feature to send notifications about threshold-triggered alerts.

    To test the connectivity of an alert callback URL, perform the following steps:

    1. Click Test next to the callback URL.

      In the Webhook Test panel, you can check and troubleshoot the connectivity of the alert callback URL based on the returned status code and test result details.

      Note

      To obtain the details of the test result, configure the Test Template Type and Language parameters and click Test.

    2. Click Close.

    Note

    You can click Advanced Settings to configure this parameter.

    Auto Scaling

    If you turn on Auto Scaling, the specified scaling rule is enabled when an alert is triggered. In this case, you must configure the Region, ESS Group, and ESS Rule parameters.

    Note

    You can click Advanced Settings to configure this parameter.

    Log Service

    If you turn on Log Service, the alert information is sent to the specified Logstore when an alert is triggered. In this case, you must configure the Region, ProjectName, and Logstore parameters.

    For more information about how to create a project and a Logstore, see Getting Started.

    Note

    You can click Advanced Settings to configure this parameter.

    Message Service - Topic

    If you turn on Message Service - Topic, the alert information is sent to the specified topic in Simple Message Queue (formerly MNS) when an alert is triggered. In this case, you must configure the Region and topicName parameters.

    For more information about how to create a topic, see Create a topic.

    Note

    You can click Advanced Settings to configure this parameter.

    Function Compute

    If you turn on Function Compute, an alert notification is sent to Function Compute for format processing when an alert is triggered. In this case, you must configure the Region, Service, and Function parameters.

    For more information about how to create a service and a function, see Quickly create a function.

    Note

    You can click Advanced Settings to configure this parameter.

    Method to handle alerts when no monitoring data is found

    The method that is used to handle alerts when no monitoring data is found. Valid values:

    • Do not do anything (default)

    • Send alert notifications

    • Treated as normal

    Note

    You can click Advanced Settings to configure this parameter.

Manage alert rules

  1. Log on to the CloudMonitor console.

  2. In the left-side navigation pane, choose Alerts > Alert Rules. On the page that appears, you can view, modify, enable, disable, or delete alert rules based on your business requirements.