All Products
Search
Document Center

ApsaraDB for MongoDB:Configure threshold-triggered alert rules for an ApsaraDB for MongoDB instance

Last Updated:Aug 04, 2023

ApsaraDB for MongoDB allows you to configure threshold-triggered alert rules that are used to monitor the crucial metrics of an ApsaraDB for MongoDB instance. If the value of a metric is not within the range that you specify in the alert rule for the metric, CloudMonitor sends you an alert notification about the exception. The information in the alert notification helps you efficiently handle the exception. This topic describes how to configure threshold-triggered alert rules for an ApsaraDB for MongoDB instance in the ApsaraDB for MongoDB console.

Procedure

  1. Log on to the ApsaraDB for MongoDB console.

  2. In the left-side navigation pane, click Replica Set Instances or Sharded Cluster Instances.

  3. In the upper-left corner of the page, select the resource group and region to which the instance belongs.

  4. Click the ID of the instance that you want to manage, or find the instance and click Manage in the Actions column.

  5. In the left-side navigation pane, click Alert Rules.

  6. Click Set Alert Rule in the upper-left corner to go to the CloudMonitor console.

  7. In the CloudMonitor console, configure a threshold-triggered alert rule for the instance.

    1. In the left-side navigation pane, choose Alerts > Alert Rules. On the Alert Rules page, click Create Alert Rule.

    2. In the Create Alert Rule panel, configure the parameters described in the following table.

      Parameter

      Description

      Product

      The name of the Alibaba Cloud service that can be monitored by CloudMonitor.

      Select ApsaraDB for MongoDB - Standalone Instance, ApsaraDB for MongoDB - Replica Set, or ApsaraDB for MongoDB - Sharded Cluster.

      Resource Range

      The range of the resources on which you want the alert rule to take effect. Valid values:

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

        For example, you can configure an alert rule based on which an alert is triggered when CPU utilization exceeds 80% and apply the alert rule to all ApsaraDB for MongoDB instances that are created within your Alibaba Cloud account. In this case, CloudMonitor sends you an alert notification when the CPU utilization of an ApsaraDB for MongoDB instance exceeds 80%. If you set the Resource Range parameter to All Resources, the alert rule can be applied to up to 1,000 instances. If more than 1,000 instances of the specified Alibaba Cloud service are created within your Alibaba Cloud account, CloudMonitor may not send you alert notifications even if the value of the metric in the alert rule reaches the specified threshold. Before you configure the alert rule, we recommend that you group the instances based on your business requirements.

      • Application Group: 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.

        For example, you can configure an alert rule based on which an alert is triggered when CPU utilization exceeds 80% and apply the alert rule to an Elastic Compute Service (ECS) instance. In this case, CloudMonitor sends you an alert notification when the CPU utilization of the ECS instance exceeds 80%.

      Rule Description

      The content of the alert rule. If a metric meets the specified condition, the alert rule is triggered. To specify the condition, perform the following steps:

      1. Click Add Rule.

      2. In the Add Rule Description panel, specify the rule name, metric type, metrics, thresholds, and alert levels.

      3. Click OK.

      Note

      You can click Add Alert Rule to configure multiple alert rules. The metrics for which you can configure alert rules vary based on the architecture of the ApsaraDB for MongoDB instance. For more information, see the following references:

      Mute for

      The interval at which you want CloudMonitor to resend alert notifications if the alert is not cleared. Valid values: 5 Minutes, 15 Minutes, 30 Minutes, 60 Minutes, 3 Hours, 6 Hours, 12 Hours, and 24 Hours.

      If the threshold value is exceeded, CloudMonitor sends an alert notification. If the threshold value is exceeded again within the mute period, CloudMonitor does not resend an alert notification. If the alert is not cleared when the mute period elapses, CloudMonitor resends an alert notification.

      Effective Period

      The period of time during which you want the alert rule to take effect. CloudMonitor monitors the specified resources based on the alert rule only within the specified period of time.

      Alert Contact Group

      The alert contact group to which alert notifications are sent.

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

      For 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 key and a value.

      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.

      Note

      You can click Advanced settings to set this parameter.

      Auto Scaling(The corresponding scaling rule will be triggered when the alert occurs.)

      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 set this parameter.

      Log Service(If you select Log Service, the alert information will be written to Log Service.)

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

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

      Note

      You can click Advanced settings to set this parameter.

      Message Service - Topic

      If you turn on Message Service - Topic, the alert information is written to the specified topic in Message Service (MNS) when an alert is triggered. In this case, you must select a region and a topic.

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

      Note

      You can click Advanced settings to set 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 Create a function in the Function Compute console.

      Note

      You can click Advanced settings to set this parameter.

      Method to handle alerts when no monitoring data is found

      Specify the method that is used to handle alerts if no monitoring data exists. Valid values:

      • Do not do anything (default)

      • Send alert notifications

      • Treated as normal

      Note

      You can click Advanced settings to set this parameter.

    3. Click OK.

      After the configuration is completed, return to the alert rules and view the alert rule. You can also view the alert rule on the Alert Rules page in the ApsaraDB for MongoDB console.

References