The health diagnosis feature of Auto Scaling helps you comprehensively check and understand the health status of your scaling group in real time. This way, you can detect and resolve issues at the earliest opportunity. This improves the success rate of scale-outs or scale-ins.
Prerequisites
A scaling group is created. For more information, see Create scaling groups.
Background information
You can use the health diagnosis feature of Auto Scaling to diagnose your scaling group attributes, billing, and quota. You can also use the feature to keep updated on the latest configurations of your scaling group. To use the health diagnosis feature, you can use one of the following methods:
- Manual health diagnosis: You can initiate a health diagnosis request to obtain the health report of the scaling group regardless of whether your scaling group is in the Enabled or Disabled state. For more information, see Manually initiate a health diagnosis request.
- Automatic health diagnosis: If your scaling group is in the Enabled state, you can use the event notification feature of CloudMonitor together with automatic health diagnosis. When Auto Scaling checks the health status of your scaling group, CloudMonitor receives event notifications and displays the details of exceptions. For information about how to replace images, see Configure an automatic health diagnosis task.
Manually initiate a health diagnosis request
- Log on to the Auto Scaling console.
- Find a scaling group and use one of the following methods to go to the scaling group details page:
- Click the ID of the scaling group in the Scaling Group Name/ID column.
- Click Details in the Actions column.
- In the upper part of the scaling group details page, click the Health Check tab.
- Click Diagnose Now. When the status in the Diagnostic Progress column changes from Diagnosing to Completed, the health diagnosis is complete. Then, you can view information such as the report ID and diagnostic status.
- In the Actions column of the report, click View Report.
- If a similar report is displayed as shown in the following figure, no exceptions are detected and your scaling group is healthy.
- If a similar report is displayed as shown in the following figure, exceptions are detected. Resolve the issues based on the exception details and troubleshooting suggestions. The following figure shows that the vSwitch is abnormal.
Note If you want to delete a report after you view the content of the report, click Delete Report in the Actions column. In the Delete Report message, click OK. - If a similar report is displayed as shown in the following figure, no exceptions are detected and your scaling group is healthy.
Configure an automatic health diagnosis task
Before you configure an automatic health diagnosis task, make sure that your scaling group is in the Enabled state. For more information, see Enable or disable scaling groups.
- Log on to the Auto Scaling console.
- Find a scaling group and use one of the following methods to go to the scaling group details page:
- Click the ID of the scaling group in the Scaling Group Name/ID column.
- Click Details in the Actions column.
- In the upper part of the scaling group details page, click the Notification Rules tab.
- Click Create Advanced Rule.
- In the Create Notification Rule dialog box, configure a notification method and specify a notification event, and then click OK. The following table describes the parameters.
Parameter Description Notification Method Set the value to CloudMonitor. Event Select Scaling Group Diagnosis. - Find the notification rule that is created in Step 5 and click CloudMonitor in the Notification Method column to go to the System Event page.
- On the Event Monitoring tab, select Auto Scaling and click Search to query exceptions that are detected during the health diagnosis. Note CloudMonitor updates the health diagnosis result every 2 hours.
- If no exceptions are detected in your scaling group during the health diagnosis, no data is displayed on the CloudMonitor page.
- If exceptions are detected in your scaling group during the health diagnosis, your CloudMonitor page is displayed as shown in the following figure. In the figure, the exception is that the vSwitch is deleted. In the Actions column of the Auto Scaling system event, click Details to view the details of the event. Sample event details:
{ "details": [ { "diagnoseType": "VSwitch", "errorCode": "VSwitchIdNotFound", "resourceId": "vsw-bp1ech44ks0w4zq4u****", "status": "Critical" } ] }
Health diagnosis items and results
The health diagnosis items and results are identical regardless of whether you manually initiate a health diagnosis request or configure an automatic health diagnosis task. The following table describes the health diagnosis items and results.
Category | Item type | Item name | Description | Error code | Exception and troubleshooting suggestion |
---|---|---|---|---|---|
Critical resource exception | vSwitch | vSwitch status | Checks whether a specific vSwitch can function as expected. For example, if a vSwitch is deleted, the vSwitch cannot provide services and an exception occurs. | VSwitchIdNotFound |
|
SecurityGroup | Security group status | Checks whether a specific security group can function as expected. For example, if a security group is deleted, the security group cannot provide services and an exception occurs. | SecurityGroupNotFound |
| |
KeyPair | KeyPair status | Checks whether a specific key pair is available. For example, if a key pair is deleted, you can no longer use the key pair. | KeyPairNotFound |
| |
Quota check | SlbBackendServerQuota | Number of servers attached to the associated CLB instances | Checks whether the number of ECS instances or elastic container instances that are attached to the associated Classic Load Balancer (CLB, formerly known as SLB) instances as backend servers exceeds the quota. | SlbBackendServerQuotaExceeded |
|
AlbBackendServerQuota | Number of servers attached to the associated ALB instances | Checks whether the number of ECS instances or elastic container instances that are attached to the associated Application Load Balancer (ALB) instances as backend servers exceeds the quota. | AlbBackendServerQuotaExceeded |
| |
NlbBackendServerQuota | Number of servers attached to the associated NLB instances | Checks whether the number of ECS instances or elastic container instances that are attached to the associated Network Load Balancer (NLB) instances as backend servers exceeds the quota. | NlbBackendServerQuotaExceeded |
| |
Billing diagnosis | AccountArrearage | Overdue payments | Check whether your Alibaba Cloud account has overdue payments. | AccountArrearage |
|
Inventory diagnosis | ElasticStrength | Inventory sufficiency | Check whether the instance types that are specified in the scaling configuration are sufficient. | ElasticStrengthAlert |
|