All Products
Search
Document Center

CloudMonitor:Alert service

Last Updated:Feb 26, 2024

You can configure alert rules for key metrics of a cloud service to monitor the health status of the cloud service in real time. If the metrics are abnormal, the specified alert contacts can receive alert notifications and fix problems at the earliest opportunity. This topic describes how to get started with the alert service of CloudMonitor. In this topic, an alert rule and an alert contact are configured to monitor the CPU utilization of an Elastic Compute Service (ECS) instance.

Prerequisites

An ECS instance is created, and the CloudMonitor agent is installed on the ECS instance. For more information, see Creation methods and Install and uninstall the CloudMonitor agent for C++.

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. If the alert is escalated or cleared, another notification is immediately sent.

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

Step 1: Create an alert contact

You can create an alert contact to receive alert notifications.

  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 and email address of the alert contact. Keep the default values of other parameters.

  5. Confirm the parameter settings and click OK.

  6. Activate the email address of the alert contact.

    By default, the email address of the alert contact is in the Pending Activation state. CloudMonitor sends an email with an activation link to the alert contact. The alert contact must visit the link to activate the email address within 24 hours. Otherwise, alert notifications cannot be sent to the alert contact. After the email address is activated, you can view it in the alert contact list.

Step 2: Create an alert contact group

When you create an alert rule, you can only select an alert contact group. Alert notifications are sent to all alert contacts in the alert contact group.

  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.

Step 3: Create an alert rule

You can create an alert rule to monitor the CPU utilization of the ECS instance. If the metric value reaches the specified threshold value, alert notifications are sent.

  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, set the Product parameter to Elastic Compute Service (ECS), add an alert rule, and select the alert contact group created in Step 2. When you add the alert rule, choose Instance Dimension > (ECS) CPU Utilization from the Metric drop-down list, set Critical as the alert level, and set the alert condition to Average, >=, and 80%.

    For information about how to configure the parameters of an alert rule, see Parameters of an alert rule.

  5. Click OK.

Step 4: View the alert rule and alerting status

After you create an alert rule, you can view the rule and alerting status.

  1. Log on to the CloudMonitor console.
  2. In the left-side navigation pane, click Host Monitoring.
  3. On the Host Monitoring page, click View Alert Rules in the upper-right corner or Alert Rules in the Actions column of the host.
  4. On the Alert Rules page, find the alert rule that you want to view and click More in the Actions column.

References

For information about how to send alert notifications to third-party platforms, see Use the alert callback feature to send notifications about threshold-triggered alerts.

For information about the best practices of alert callback, see Receive alert notifications in the PagerDuty console, Enable an alert contact to receive alert notifications in a DingTalk group, Enable an alert contact to receive alert notifications in a Lark group, and Enable an alert contact to receive alert notifications in a WeCom group.