This topic describes how to query the CPU utilization and credits of a burstable instance in the ECS console, and how to set CPU credit alert rules in the Cloud Monitor console.
Prerequisites
To set the contacts who receive notifications, you must create a contact group in advance. For more information, see Create an alert contact or alert group.
Background information
Changes to the CPU credits of a burstable instance directly affect the CPU utilization and load performance of the instance. You can set monitoring alert rules for one or more burstable instances in the Cloud Monitor console. The following items can be monitored: consumed CPU credits, banked CPU credits, overdrawn CPU credits, and advance CPU credits. The following table describes the monitoring metrics of CPU credits for burstable instances.
Monitoring metric | Descripition |
---|---|
Burstable Instance-CPU Credit Consumption | Displays changes in consumed CPU credits. Consumption trends are consistent with CPU utilization. For more information, see CPU credits. |
Burstable Instance-CPU Credit Balance | Displays changes in banked CPU credits. Banked CPU credits are used to maintain CPU utilization. For more information, see 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 Performance 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 Performance mode. |
Query CPU credit usage information
You can perform the following steps to query the real-time credit trend of a burstable instance in the ECS console.
- Log on to the ECS console.
- In the left-side navigation pane, choose .
- In the top navigation bar, select a region.
- Find the burstable instance and click its ID. The Instance Details tab appears.
- Click the Monitoring tab and view the CPU credit usage and CPU utilization information of the instance.
Create CPU credit alert rules
- In standard mode, if a burstable instance does not have any available CPU credits, the CPU utilization cannot exceed the baseline performance. When the Total Credit 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 CPU credits, overdrawn CPU credits are consumed and billed on an hourly basis. This ensures that the CPU utilization exceeds the baseline performance. When the Notpaid Surplus Credit item is monitored, you can receive notifications when overdrawn CPU credits are billed to 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.
- On the Create Alert Rule page, configure the following parameters:
- Click Confirm.