This topic describes how to enable event notification for vertical scaling tasks. If an exception occurs during vertical scaling, the system triggers an immediate alert, enabling quick resolution to minimize business disruption.
Implementation principles
During vertical scaling, CloudOps Orchestration Service automatically runs the ACS-ECS-ModifyInstanceSpec
template to adjust instance specifications. CloudMonitor tracks the template's execution status and configures event notifications, enabling alerts for the scaling task.
For information about CloudMonitor, see What is CloudMonitor?
For information about OOS, see What is OOS?
Procedure
Step 1: Configure an event notification receiver
Before proceeding, specify where Auto Scaling should send event notifications for vertical scaling exceptions. You can configure a receiver by using one of these methods:
Notify by email, call, or text message
Enable Auto Scaling to send event notifications via email, text message, or phone call to designated employees, like O&M staff. For more information, see Create an alert contact group.
Notify by @mention
Configure webhooks to send Auto Scaling event notifications to DingTalk, Lark, or WeCom group chats. For more information, see Create an alert contact group.
Notify by other cloud services
If the previous methods don't meet your needs, enable Auto Scaling to send event notifications to Alibaba Cloud services like Simple Message Queue (SMQ) or Function Compute. You can then configure custom notification logic through these services. For more information, see Create a push channel.
Before you proceed, make sure that an alert contact group or a push channel is created.
Step 2: Create an event subscription policy
If a vertical scaling task fails after you set up an event subscription policy, Auto Scaling captures the event and notifies the receiver specified in Step 1.
Log on to the CloudMonitor console. In the left-side navigation pane, choose . Then, go to the Event Subscription page.
On the Subscription Policy tab, click Create Subscription Policy and go to the Create Subscription Policy wizard.
Configure the parameters in the Basic information step as prompted.
Configure the parameters in the Alert Subscription step as prompted.
The following table describes the parameters.
Parameter
Description
Example
Parameter
Description
Example
Subscription Type
Set this parameter to System events. System events track cloud service faults and operational issues. By subscribing, you can receive timely notifications or trigger external actions when events occur.
System events
Product
Select CloudOps Orchestration Service (OOS).
CloudOps Orchestration Service (OOS)
Event Type
Choose
.Status Notification
Event Name
Choose
. You can also choose to obtain more detailed change notifications.Execution:Status Change
Event Level
Select an event level based on your business requirements.
Critical
Event Content
Enter
ACS-ECS-ModifyInstanceSpec
. This is the OOS template that is executed to enable automatic vertical scaling.ACS-ECS-ModifyInstanceSpec
Configure the parameters in the Combined noise reduction step based on your business requirements.
Configure the parameters in the Notification and Push and Integration steps.
Perform the following operations based on the event notification method that is configured in Step 1:
Notify by email, call, text message, or @mentionNotify by other cloud servicesTo send event notifications via email, phone call, text message, or group chat, first create an alert contact group (as described in Step 1). Then, configure the parameters in the Notification step.
Choose
.In the Notification Configuration drop-down list, click Create Notification Configuration to go to the Create Notification Configuration panel.
Follow the on-screen instructions to configure parameters and click OK. The following table describes the parameters.
Parameter
Description
Example
Name
Enter a name as prompted.
Vertical scaling notification
Notification Settings
The default value is Set the notification group directly. You can also select Set the notification group by severity to enable finer-grained event notification.
Set the notification group directly
Contact Group
Select the alert contact group that is created in Step 1.
test-group
Configure custom notification methods. You can follow the on-screen instructions to set up custom notification templates and alert levels for each notification method.
To send event notifications to other cloud services, configure the parameters in the Push and Integration step if you've already created a push channel (as described in Step 1).
Choose Step 1 from the drop-down list.
. Click +Add Channel. Then, select the push channel that is created inCheck the configurations and click Submit to complete policy creation.
(Optional) Verify the feature
Preemptible instances do not support vertical scaling. Creating a vertical scaling task for them will likely fail. To confirm this, attempt a vertical scaling task on your preemptible instance. If you receive a notification upon task completion, the feature is active.
Perform the following steps:
Log on to the ECS console to create a preemptible instance. For more information, see Create a preemptible instance.
Log on to the Auto Scaling console. Create and execute a vertical scaling task for the preemptible instance. For more information, see Manage vertical scaling tasks.
Wait for the vertical scaling to finish and verify if the event notification feature works.