Auto Scaling allows you to create advanced and regular notification rules. An advanced notification rule is a type of monitoring method that enables notifications to be automatically pushed from Auto Scaling to CloudMonitor or Simple Message Queue (SMQ, formerly MNS). This helps you understand the dynamic trends of your scaling group at the earliest opportunity and further automates the management of scaling events. Compared with advanced notification rules, regular notification rules require manual handling of scaling events.
Notification methods
Auto Scaling supports advanced and regular notification rules.
Advanced notification rule
Auto Scaling sends notifications to CloudMonitor, SMQ topics, or SMQ queues after scaling events are triggered in the scaling group. For more information, see Create an event notification rule.
CloudMonitor is a cloud service that provides statistics about cloud service events and an entry point to query the statistics. You can use CloudMonitor to learn about the status of your scaling groups in real time. For information about the event monitoring feature of CloudMonitor, see View system events.
SMQ provides the topic and queue service models. SMQ is a distributed messaging service that allows you to transfer data and messages between distributed components and build loosely coupled systems. For more information about SMQ topics and SMQ queues, see What is SMQ?.
An SMQ queue is a point-to-point messaging model that supports concurrent communications with high reliability. If you want to send a message to only one message consumer, you can use an SMQ queue.
An SMQ topic is a publish/subscribe messaging model. The publisher pushes a message to a topic, and then all subscribers to the topic receive and consume the message. In the SMQ topic model, messages can be pushed to subscribers from multiple servers by using various methods. Subscribers can receive messages from various channels.
Regular notification rule
Auto Scaling sends event notifications by text message, internal message, and email after a scaling event succeeds, fails, or is rejected. After you receive the event notifications, you must manually resolve the issues when exceptions occur. For more information, see Create a regular notification rule.
If you create an advanced notification rule for a scaling group, you cannot create a regular notification rule for the scaling group. If you want to create a regular notification rule for the scaling group, delete the advanced notification rule first.
Examples
This section provides examples on how to use the event notification feature. For information about parameters, see Manage event notification rules.
Event notifications by using CloudMonitor
For example, when you created an advanced notification rule, you set the Notification Method parameter to CloudMonitor and selected the following events: Successful Scale-out and Scale-out Started. After a scale-out event is complete, Auto Scaling sends a notification together with the event details, including the event name, event level, event region, and resources that are consumed in the event, to CloudMonitor.
The System Event page of CloudMonitor displays the details of the Scale-out Started and Successful Scale-out events. For information about how to view event details, see View system events.
NoteIn addition to querying the event details in the CloudMonitor console, you can create alert rules to notify contacts by text message and email. This helps improve the O&M efficiency.
Event notifications by using SMQ topics
For example, when you created an advanced notification rule, you set the Notification Method parameter to MNS Topic, selected an SMQ topic that resides in the same region as your scaling group, and then specified Scale-in Started as the event. After a scale-in event is complete, Auto Scaling pushes a message to the specified SMQ topic. The subscribers of the SMQ topic can consume the message. The following figure shows the result of a successful scale-in event. The number of notifications in the specified SMQ topic increases. You can click View Subscriptions to view the details of the notification.
An MNS topic does not support the direct consumption of notifications. Consumers must subscribe to the MNS topic by using an MNS queue, an HTTP protocol, or an email. When the MNS topic receives a message, the MNS topic pushes the message to the subscribers. This allows multiple subscribers to separately consume the message from the same publisher. This improves the efficiency of automated management.
Event notifications by using SMQ queues
For example, when you created an advanced notification rule, you set the Notification Method parameter to MNS Queue, selected an SMQ queue that resides in the same region as your scaling group, and then selected the following events: Scale-out Started and Scale-out Failed. When a scale-out event fails, Auto Scaling sends a notification to the specified SMQ queue. Then, the SMQ queue pushes the notification as a message to the subscribers for consumption. The following figure shows the result of a failed scale-out event. The number of available notifications in the SMQ queue increases.
You can consume, delay, activate, or delete notifications based on your business requirements to flexibly automate notification management.
How do I manage a notification rule?
The following table provides relevant links on how to manage a notification rule.
Rule type | Option | API references |
Manage an advanced notification rule | ||
Modify an advanced notification rule | ||
Delete an advanced notification rule | ||
View an advanced notification rule | ||
Configure a regular notification rule | None. |