ApsaraDB for MongoDB monitors key instance metrics and sends an alert notification when a metric crosses the threshold you set. This topic shows you how to create a threshold-triggered alert rule from the MongoDB console.
Prerequisites
Before you begin, ensure that you have:
An ApsaraDB for MongoDB instance (standalone, replica set, or sharded cluster)
An alert contact group configured in CloudMonitor. If you haven't created one, see Create an alert contact or an alert contact group
Create a threshold-triggered alert rule
Log on to the MongoDB console.
In the left navigation pane, click Replica Set Instances or Sharded Cluster Instances based on your instance type.
In the upper-left corner, select the resource group and region of the instance.
Click the ID of the target instance, or click Manage in the Actions column.
In the left navigation pane, click Alert Rules.
In the upper-left corner, click Set Alert Rule. You are redirected to the CloudMonitor console.
On the Alert Rules page, click Create Alert Rule.
In the Create Alert Rule panel, configure the following parameters.
Basic settings
Parameter Description Product The Alibaba Cloud service to monitor. Select ApsaraDB For MongoDB - Standalone Instance, ApsaraDB For MongoDB - Replica Set, or ApsaraDB For MongoDB - Sharded Cluster based on your instance type. Resource Range The scope of resources the rule applies to. See the table below for valid values. Rule Description The conditions that trigger the alert. Click Add Rule, configure the rule name, metric type, metric, threshold, and alert level in the Configure Rule Description panel, and then click OK. Click Add Rule again to add multiple conditions. For supported metrics by instance type, see Metrics for standalone instances, Metrics for replica set instances, and Metrics for sharded cluster instances. Mute Period How long CloudMonitor waits before sending a repeat alert after the first notification. If the metric remains above the threshold after the mute period ends, another alert is sent. Valid values: 5 minutes, 15 minutes, 30 minutes, 60 minutes, 3 hours, 6 hours, 12 hours, and 24 hours. Effective Period The time window during which the alert rule is active. CloudMonitor only monitors data and sends alerts during this period. Alert Contact Group The contact group to receive alert notifications. A group can contain one or more alert contacts. Tag A tag for the alert rule, consisting of a tag key and a tag value. Resource range options
Value Description All Resources Applies to all resources of the selected cloud service under your account. Alerts are sent whenever the threshold is crossed on any resource. Supports up to 1,000 resources — if you have more, use application groups instead. Application Groups Applies to all resources in a specified application group. Use this to organize resources by business before setting alerts. Instances Applies to a specific instance. For example, send an alert when the CPU utilization of a particular instance exceeds 80%. Advanced settings (click Advanced Settings to expand)
Parameter Description Alert Callback A public URL that receives alert notifications via HTTP POST requests. Only HTTP is supported. See Use the alert callback feature. Auto Scaling Triggers a scaling rule when an alert fires. Requires Region, ESS Group, and ESS Rule. See Configure scaling groups and Configure scaling rules. Log Service Writes alert information to a Simple Log Service (SLS) Logstore when an alert fires. Requires Region, ProjectName, and Logstore. See Quick start for SLS. Simple Message Queue (formerly MNS) — Topic Writes alert information to a Simple Message Queue topic when an alert fires. Requires the region and topic. See Create a topic. Function Compute Sends alert notifications to a Function Compute function for custom processing when an alert fires. Requires the region, service, and function. See Quickly create a function. No Data Processing How to handle alerts when monitoring data is unavailable. Valid values: Do Not Take Any Action (default), Send No-data Alerts, and Consider As Recovered. Click Confirm.
After the rule is created, view it on the Alert Rules page in the CloudMonitor console or in the MongoDB console.
What's next
After creating your alert rule, manage it in the CloudMonitor console:
To configure threshold-triggered and event-triggered alert rules directly in CloudMonitor, see Create an alert rule and Manage system event-triggered alert rules (old).