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 based on the instance type.
  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 an instance, or click More icon in the Actions column corresponding to the instance and select Manage.
  5. In the left-side navigation pane of the instance details page, click Alert Rules.
  6. Click the Set Alert Rule icon in the upper-left corner.
    Go to the Create Alert Rule page of the CloudMonitor console.
  7. In the CloudMonitor console, configure a threshold-triggered alert rule for the ApsaraDB for MongoDB instance.
    1. In the left-side navigation pane, choose Alerts > Alert Rules.
    2. On the Alert Rules page, click Create Alert Rule.
    3. In the Create Alert Rule panel, configure the parameters. The following table describes the parameters.
      Parameter Description
      Product The name of the Alibaba Cloud service that can be monitored by CloudMonitor.

      The Alibaba Cloud service to which you want to apply the alert rule. Select ApsaraDB for MongoDB-Single Node Instance, ApsaraDB for MongoDB-Instance Copy, or ApsaraDB for MongoDB-Cluster Instance.

      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 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 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 description of the alert rule. If a metric meets the specified condition, an alert is triggered. To specify the rule description, perform the following steps:
      1. Click Add Rule.
      2. In the Add Rule Description panel, configure the Alert Rule, Metric Type, Metric, and Threshold and Alert Level parameters.
      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 MongoDB instance. For more information, see the following topics:
      Mute For The interval at which CloudMonitor sends alert notifications until the alert that is triggered based on the alert rule is cleared. Valid values: 5 Minutes, 15 Minutes, 30 Minutes, 60 Minutes, 3hour, 6hour, 12hour, and 24hour.

      If the conditions of an alert rule are met, an alert is triggered. CloudMonitor does not resend an alert notification when the alert is triggered within the mute period. If the alert is not cleared after the mute period ends, CloudMonitor resends alert notifications.

      Effective Period The period during which the alert rule is effective. CloudMonitor monitors the specified resources based on the alert rule only within the specified period.
      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.

      HTTP WebHook The callback URL that can be accessed over the Internet. CloudMonitor sends POST requests to push alert notifications to the specified callback URL. You can enter only an HTTP URL. For more information about how to configure alert callbacks, see Use the alert callback feature to send notifications about threshold-triggered alerts.
      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 set this parameter.
      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. You must set 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 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 more information about how to create a topic, see Create a topic.

      Note You can click Advanced Settings to set this parameter.
      Method to handle alerts when no monitoring data is found The method that you want to use to handle alerts when no monitoring data is found. Default value: Do not do anything. Default value: Do not do anything. Valid values:
      • Do not do anything
      • Send alert notifications
      • Treated as normal
      Note You can click Advanced Settings to set this parameter.
      Tags The tags of the alert rule. A tag consists of a name and a value.
    4. Click OK.
      Return to the Threshold Value Alert tab and view the alert rule. You can also view the alert rule on the Alert Rules page in the ApsaraDB for MongoDB console.

References