This topic describes how to query the CPU usage and credits of a burstable instance (t5) in the ECS console, and how to set CPU credit alert rules in the CloudMonitor console.

Prerequisites

To set the contacts who receive notifications, you must create a contact group in advance. For more information about how to create a contact group, see the following topic in CloudMonitor documentation: Create an alert contact and an alert contact group.

Background information

Changes to the CPU credits of a burstable instance directly affect the CPU usage and load performance of the instance. You can set monitoring alert rules for one or more burstable instances in the CloudMonitor console. The following items can be monitored: CPU credit consumption, CPU credit balance, overdrawn CPU credits, and advance CPU credits. The following table describes the monitoring metrics of CPU credits for burstable instances.

Monitoring metric Description
Burstable Instance-CPU Credit Consumption Displays changes in CPU credit consumption. Consumption trends are consistent with CPU usage. For more information, see Consume CPU credits.
Burstable Instance-CPU Credit Balance Displays changes in CPU credit balance. The CPU credit balance is used to maintain CPU credit usage. For more information, see Earn CPU credits.
Burstable Instance-Overdrawn CPU Credits Displays changes in overdrawn CPU credits. Overdrawn CPU credits can be used only when the unlimited mode is enabled. For more information, see Unlimited mode.
Burstable Instance-Advance CPU Credits Displays changes in advance CPU credits. Advance CPU credits can be used only when the unlimited mode is enabled. For more information, see Unlimited mode.

Query CPU credit use information

You can perform the following steps to query the real-time credit trend of a burstable instance in the ECS console.

  1. Log on to the ECS console.
  2. In the left-side navigation pane, choose Instances & Images > Instances.
  3. In the top navigation bar, select a region.
  4. Find the burstable instance that you want to query and click its instance ID.
  5. On the Instance Details page that appears, view the CPU credit use and CPU usage information of the instance.

Create CPU credit alert rules

You can perform the following steps to create alert rules for Burstable Instance-CPU Credit Balance and Burstable Instance-Overdrawn CPU Credits in the CloudMonitor console. Two modes are available: standard and unlimited.
  • In standard mode, if a burstable instance does not have any available CPU credits, the CPU usage cannot exceed the baseline performance. When the Burstable Instance-CPU Credit Balance item is monitored, you can receive notifications when the instance performance is limited to decide whether to enable the unlimited mode.
  • In unlimited mode, if a burstable instance has consumed all of its advance credits, overdrawn CPU credits are consumed and billed on an hourly basis. This ensures that the CPU usage exceeds the baseline performance. When the Burstable Instance-Overdrawn CPU Credits item is monitored, you can receive notifications when overdrawn CPU credits are billed to decide whether to disable the unlimited mode.
  1. Log on to the CloudMonitor console.
  2. In the left-side navigation pane, choose Alarms > Alarm Rules.
  3. On the Alarm Rules page, click Create Alarm Rule.
  4. On the Create Alarm Rule page, complete the following configuration:
    1. Configure parameters in the Related Resource section.
      • Product: Set the parameter to ECS.
      • Resource Range: Set the parameter to Instances.
      • Instances: Select one or more burstable instances.
    2. Configure parameters in the Set Alarm Rules section.
      • Alarm Rule: Enter an alert rule name.
      • Rule Description: Set alert rules and judgment standards.
        • Monitoring of Burstable Instance-CPU Credit Balance: Select Burstable Instance-CPU Credit Balance. This example uses the values of 1Minute cycle, 1 periods, Average, <, and 1. If the average value of Burstable Instance-CPU Credit Balance is less than 1 and lasts for at least 1 minute, an alert is triggered.
          Note In standard mode, if the CPU credit balance is less than 1, the CPU usage of the burstable instance cannot exceed the baseline performance. In unlimited mode, if the CPU usage exceeds the baseline performance, the burstable instance will consume advance credits. If all advance credits are consumed, the burstable instance will consume overdrawn CPU credits. You can also configure the average value for multiple consecutive periods as the alert triggering condition based on your actual requirements on CPU performance.
        • Monitoring of Burstable Instance-Overdrawn CPU Credits: Select Burstable Instance-Overdrawn CPU Credits. This example uses the values of 1Minute cycle, 1 periods, Average, >, and 0. If the average value of Burstable Instance-Overdrawn CPU Credits is greater than 0 and lasts for at least 1 minute, an alert is triggered.
          Note If the value of Burstable Instance-Overdrawn CPU Credits is greater than 0, it indicates that overdrawn CPU credits are being used and billed. You can also configure the average value for multiple consecutive periods as the alert triggering condition based on your actual requirements on billing of overdrawn CPU credits.
        • Monitoring of Burstable Instance-CPU Credit Consumption: Select Burstable Instance-CPU Credit Consumption.
        • Monitoring of Burstable Instance-Advance CPU Credits: Select Burstable Instance-Advance CPU Credits.
      • Mute for: Select the interval at which notifications are pushed. This example uses the value of 10 minute.
      • Effective Period: Select the time range during which you can receive notifications.
    3. Configure parameters in the Notification Method section.
      • Notification Contact: Select a contact group to receive notifications.
      • Notification Methods: Select Text Message + Email + DingTalk Chatbot (Warning) or other methods as needed.
  5. Click Confirm.

What to do next

Enable or disable the unlimited mode