This topic describes how to query the CPU utilization and credits of a burstable instance in the Elastic Compute Service (ECS) console and how to configure alert rules on CPU credits in the CloudMonitor console.
Prerequisites
Before you can configure contacts to receive notifications, you must create a contact group. For more information, see Create an alert contact or alert contact group.
Background information
Changes to the number of CPU credits of a burstable instance directly affect the CPU utilization and load performance of the instance. You can configure alert rules that include the following monitoring metrics for one or more burstable instances in the CloudMonitor console: BurstCredit, TotalCredit, NotpaidSurplusCredit, and AdvanceCredit. The following table describes the monitoring metrics for CPU credits of burstable instances.
Metric | Description |
Burstable instance - Consumed CPU credits | The changes in CPU credit consumption. Consumption trends are consistent with CPU utilization. For more information, see CPU credits. |
Burstable Instance - Accrued CPU Credits | The changes in CPU credit balance. CPU credit balance can be consumed to maintain CPU utilization. For more information, see CPU credits. |
Burstable Instance - Excess CPU Credits | The changes in the number of overdrawn CPU credits. Overdrawn CPU credits can be used only after the unlimited mode is enabled. For more information, see Performance modes. |
Burstable Instance - Advanced CPU Credits | The changes in the number of advance CPU credits. Advance CPU credits can be used only after the unlimited mode is enabled. For more information, see Performance modes. |
View CPU credit usage information
This section describes how to view the real-time CPU credit trends of a burstable instance in the ECS console.
Go to ECS console - Instance.
In the top navigation bar, select the region and resource group of the resource that you want to manage.
Find the burstable instance and click its ID to go to the Instance Details page.
Click the Monitoring tab and view the CPU credit usage and CPU utilization of the instance.
NoteCPU utilizations displayed in the ECS console are the values measured by instance operating systems and are not used to calculate CPU credit usage.
CPU utilizations that are collected from physical machines incorporate the simulation overheads of privileged instructions and are used to calculate CPU credit usage. You can log on to the CloudMonitor console, click Host Monitoring in the left-side navigation pane, and then click the ID of an ECS instance on the Host Monitoring page. Then, you can click the Basic Monitoring tab and view the CPU utilization of the instance. For more information, see Overview.
Create alert rules on CPU credits
This section describes how to create alert rules that include the Burstable Instance-CPU Credit Balance and Burstable Instance-Overdrawn CPU Credits monitoring metrics in the CloudMonitor console. Take note of the following items:
In standard mode, if a burstable instance does not have available CPU credits, its CPU utilization cannot burst above the baseline level. You can monitor the Burstable Instance-CPU Credit Balance metric to receive notifications when instance performance is limited and determine whether to enable the unlimited mode.
In unlimited mode, after a burstable instance consumes all of its advance CPU credits, the instance consumes overdrawn CPU credits to continue to run above its performance baseline. The consumed overdrawn CPU credits are billed and charged on an hourly basis. You can monitor the Burstable Instance-Overdrawn CPU Credits metric to receive notifications when overdrawn CPU credits are billed and determine whether to disable the unlimited mode.
Log on to the CloudMonitor console.
In the left-side navigation pane, choose .
On the Alert Rules page, click Create Alert Rule.
In the Create Alert Rule panel, complete the following settings.
Configure instance-related parameters:
Product: Select Elastic Compute Service (ECS).
Resource Range: Select Instances.
Associated Resources: Select one or more burstable instances.
Click . In the Configure Rule Description panel, configure the alert rule:
Alert Rule: Enter a custom name.
Metric Type: Simple Metric.
Metric and Threshold And Alert Level: Configure the alert rule.
For example, to monitor Burstable Instance-CPU Credit Balance: Choose . In this example, if the average value of Burstable Instance-CPU Credit Balance remains less than 1 for 3 consecutive periods (1 period = 1 minute), an alert is triggered.
NoteIn standard mode, if the number of accrued CPU credits of a burstable instance is less than 1, the CPU utilization of the instance cannot exceed the performance baseline. In unlimited mode, a burstable instance can consume advance or overdrawn CPU credits to run at a CPU utilization higher than the performance baseline. You can also configure the average value for multiple consecutive periods as the alert trigger condition based on your actual requirements on CPU performance.

Mute Period: Select the interval at which notifications are pushed.
Effective Period: Select the time range during which you can receive notifications.
Alert Contact Group: Select a contact group to receive notifications.
If no contact groups are available, click Add Contact Group on the right side to add a contact group.
Tag: Alert tags are added to the alert content.
Advanced Settings.
Alert Callback: The callback URL that can be accessed over the Internet. CloudMonitor sends a POST request to push an alert notification to the specified callback URL.
Push Channel. Alert handing options are shown below. You can enable them as needed:
Auto Scaling: Enables the specified scaling rule.
Simple Log Service: Writes alert information to the specified Logstore in Log Service.
Simple Message Queue (formerly MNS) - Topic: Writes alert information to the specified Message Service topic.
Function Compute: Sends alert information to Function Compute for formatting. In this case, you must specify a region, a service, and a function.
Method to handle alerts when no monitoring data is found: By default, if no monitoring data is found and an alert is triggered, Do not do anything is specified for this parameter.
After you complete the configuration based on your requirements, click Confirm.