All Products
Search
Document Center

CloudMonitor:Alert service

Last Updated:Aug 07, 2023

You can use alert rules to specify how CloudMonitor checks monitoring data and when CloudMonitor sends alert notifications. After you configure alert rules for specific metrics, you can receive alert notifications immediately after exceptions occur and handle the exceptions at the earliest opportunity.

Background information

  • You can specify a mute period such as 24 hours for an alert rule. If the alert rule is not triggered as expected, CloudMonitor sends only one alert notification within the mute period. This prevents an excessive number of alert notifications from being sent within a short period of time.

  • By default, CloudMonitor automatically creates an alert contact group and adds your Alibaba Cloud account as an alert contact to the alert contact group.

Create an alert contact

An alert contact can be added to multiple alert contact groups.

  1. Log on to the CloudMonitor console.
  2. In the left-side navigation pane, choose Alerts > Alert Contacts.
  3. On the Alert Contacts tab, click Create Alert Contact.
  4. In the Set Alert Contact panel, enter the name, email address, and webhook URL of the alert contact. Make sure that the Language of Alert Notifications parameter is set to the default value Automatic.
    Note Automatic indicates that CloudMonitor automatically selects the language of alert notifications based on the language that you use to create your Alibaba Cloud account.
  5. Verify the parameters and click OK.
  6. Optional. Activate the email address of the alert contact.
    By default, the email address of the alert contact is in the Pending Activation state. After the alert contact receives an email that contains the activation link, the alert contact must activate the email address within 24 hours. Otherwise, the alert contact cannot receive alert notifications. After the email address is activated, you can view the email address in the alert contact list.

Create an alert contact group

An alert contact group can contain one or more alert contacts.

  1. Log on to the CloudMonitor console.
  2. In the left-side navigation pane, choose Alerts > Alert Contacts.
  3. Click the Alert Contact Group tab.
  4. On the Alert Contact Group tab, click Create Alert Contact Group.
  5. In the Create Alert Contact Group panel, enter a name for the alert contact group and add alert contacts to the alert contact group.
  6. Click Confirm.

Add multiple alert contacts to an alert contact group at a time

  1. Log on to the CloudMonitor console.
  2. In the left-side navigation pane, choose Alerts > Alert Contacts.
  3. On the Alert Contacts tab, click the check boxes in front of the alert contacts.
  4. Click Add to Contact Group.
  5. In the Confirm dialog box, select the alert contact group.
  6. Click OK.

Create an alert rule

  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. 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.

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

    3. Click OK.

    Note

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

    Mute For

    The interval at which CloudMonitor resends alert notifications before the 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, Cloud Monitor 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 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 tags of the alert rule. A tag consists of a key and a 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. You can enter only an HTTP URL. 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 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 Message Service (MNS) when an alert is triggered. In this case, you must configure the Region and topicName parameters.

    For 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 Create a function in the Function Compute console.

    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.