You can receive notifications for scaling events by using advanced or regular notification rules. Advanced notification rules automate monitoring by sending messages to destinations such as CloudMonitor or Simple Message Queue (formerly MNS). This lets you track your scaling group's activity and automate responses to scaling events. In contrast, a regular notification rule requires you to manually handle the outcome of a scaling event, such as a scale-out or scale-in, after you receive a notification.
Notification methods
Auto Scaling supports two types of notification rules for a scaling group: advanced notification rules and regular notification rules.
Advanced notification rule
When a scaling event occurs in a scaling group, Auto Scaling sends a notification to a specified destination, such as CloudMonitor, an SMQ topic, or an SMQ queue. For more information, see Create an event notification.
-
CloudMonitor: Provides a centralized place to view and query system events from various cloud products, including Auto Scaling. For more information about the event monitoring feature of CloudMonitor, see System event monitoring for cloud products.
-
SMQ topics and SMQ queues: These are the two service models of Simple Message Queue (formerly MNS). Simple Message Queue (formerly MNS) is a distributed messaging service for transferring data and sending notifications between application components to build loosely coupled systems. To learn more about the features of SMQ topics and SMQ queues, see What is Simple Message Queue?.
NoteFor information about billing for Simple Message Queue (formerly MNS), see Billing.
-
The queue model provides reliable, one-to-one message delivery for high-concurrency applications. Each message in an SMQ queue is processed by only one consumer.
-
The topic model uses a one-to-many publish/subscribe pattern. A message published to a topic is delivered to all its subscribers simultaneously. The system pushes the message to each subscriber according to the delivery method and server endpoint defined in their subscription, allowing a single message to be received through multiple channels.
-
Regular notification rule
When a scaling event succeeds, fails, or is rejected, Auto Scaling can send notifications by text message, internal message, or email. You must then manually handle these events. For more information, see Configure a regular notification rule.
You cannot use regular notification rules for a scaling group if advanced notification rules are already configured. To use regular notification rules, you must first delete all existing advanced notification rules.
Examples of advanced notification rules
This topic provides examples of advanced notification rules. For parameter details, see Create an event notification.
-
Example: Send notifications to CloudMonitor
You create an advanced notification rule that sends notifications to CloudMonitor for the event types Successful Scale-out and Scale-out Started. After a successful scale-out event, CloudMonitor receives a notification and displays the event details, including the event name, level, region, and associated resources.
For example, after a successful scale-out event, the details for Scale-out Started and AUTOSCALING(SCALE_OUT_SUCCESS) appear on the System Event page in the CloudMonitor console. To learn how to view event details, see View system events.
NoteIn addition to viewing scaling group activities in the CloudMonitor console, you can also create alert rules to notify contacts in bulk by text message or email. This improves O&M efficiency.
-
Example: Send notifications to an SMQ topic
You create an advanced notification rule that sends notifications to an MNS Topic. You select an SMQ topic in the same region as your scaling group and choose the event types Successful Scale-in and Scale-in Started. After a successful scale-in event, the SMQ topic receives the notification and distributes it to its subscribers. This increases the message count in the topic. You can then go to View Subscriptions to view the message details.
Messages cannot be consumed directly from an SMQ topic. Instead, you must create a subscription with an endpoint, such as an SMQ queue, an HTTP/S server, or an email address. When the topic receives a message, it automatically pushes that message to all subscribers. This model provides centralized distribution with independent consumption, enabling efficient automated management.
-
Example: Send notifications to an SMQ queue
You create an advanced notification rule that sends notifications to an MNS Queue. You select an SMQ queue in the same region as your scaling group and choose the event types Scale-out Failed and Scale-out Started. If a scale-out event fails, the SMQ queue receives the notification. This increases the number of Active Messages in the queue.
You can consume, delay, activate, or delete these messages as needed, which gives you the flexibility to build automated workflows based on scaling events.
How to configure notification rules
The following table lists the documentation related to notification rules for scaling groups.
|
Console guide |
Actions |
API reference |
|
Create an event notification |
||
|
Modify an advanced notification rule |
||
|
Delete an advanced notification rule |
||
|
View an advanced notification rule |
||
|
Configure a regular notification rule |
None |