This topic describes how to create a notification rule for a scaling group. After a scaling activity of the specified type occurs, Auto Scaling sends event notifications to the specified Message Service (MNS) topic, the specified MNS queue, or CloudMonitor.

Prerequisites

If you want Auto Scaling to send event notifications to an MNS topic or queue, you must create the MNS topic or queue in advance. Make sure that the MNS topic or queue resides in the region where the scaling group resides. For more information, see Create a topic or Create a queue.

Background information

  • Auto Scaling provides the event notification feature that allows you to obtain dynamic information about your scaling group at the earliest opportunity and allows your scaling group to be automatically managed. For more information, see Overview.
  • The values that you specify for the Notification Method parameter of the notification rules that you create for a scaling group must be the same regardless of the number of notification rules. You can set the Notification Method parameter to CloudMonitor, MNS Topic, or MNS Queue.

Create a notification rule

You can create up to six notification rules for a scaling group.

  1. Log on to the Auto Scaling console.
  2. In the left-side navigation pane, click Scaling Groups.
  3. In the top navigation bar, select a region.
  4. Find a scaling group and go to the details page of the scaling group. You can use one of the following methods to go to the details page:
    • Click the ID of the scaling group in the Scaling Group Name/ID column.
    • Click Details in the Actions column of the scaling group.
  5. In the upper part of the page, click the Notifications tab.
  6. Click Create Advanced Rule.
  7. Configure parameters of the rule.
    The following table describes the parameters.
    Parameter Description
    Notification Method Valid values:
    • CloudMonitor: If a scaling activity of the specified type occurs, an event notification is sent to CloudMonitor. For more information, see View system events.
    • MNS Topic: If a scaling activity of the specified type occurs, an event notification is sent to an MNS topic. For more information, see What is MNS?.
    • MNS Queue: If a scaling activity of the specified type occurs, an event notification is sent to an MNS queue. For more information, see What is MNS?.
    Event The type of the event. Configure this parameter based on your business requirements. Valid values:
    • Successful Scale-out: All Elastic Compute Service (ECS) instances or elastic container instances are added to the scaling group.
    • Successful Scale-in: All ECS instances or elastic container instances are removed from the scaling group.
    • Scale-out Failed: A scale-out activity is triggered, but ECS instances or elastic container instances are not added to the scaling group.
    • Scale-in Failed: A scale-in activity is triggered, but ECS instances or elastic container instances are not removed from the scaling group.
    • Scaling Request Rejected: Auto Scaling receives a scaling request, but rejects the request because the trigger conditions are not met.
    • Scale-out Started: A scale-out activity is triggered, and ECS instances or elastic container instances start to be added to the scaling group.
    • Scale-in Started: A scale-in activity is triggered, and ECS instances or elastic container instances start to be removed from the scaling group.
    • Scheduled Task Expired: Notifications are sent on a daily basis for seven days before the scheduled task expires.

      If you configure the Recurrence parameter for the scheduled task, the task expiration time is the last time when the task is executed.

    • Partially Successful Scale-out: A scale-out activity is triggered, but only specific ECS instances or elastic container instances are added to the scaling group.
    • Partially Successful Scale-in: A scale-in activity is triggered, but only specific ECS instances or elastic container instances are removed from the scaling group.
  8. Click OK.

Modify or delete a notification rule

If the specified events of a notification rule cannot meet your business requirements, you can change the value of the Event parameter. However, you cannot change the value of the Notification Method parameter when you modify an existing notification rule. If you no longer require your notification rule, you can delete the notification rule.

  1. Log on to the Auto Scaling console.
  2. In the left-side navigation pane, click Scaling Groups.
  3. In the top navigation bar, select a region.
  4. Find a scaling group and go to the details page of the scaling group. You can use one of the following methods to go to the details page:
    • Click the ID of the scaling group in the Scaling Group Name/ID column.
    • Click Details in the Actions column of the scaling group.
  5. In the upper part of the page, click the Notifications tab.
  6. Find the notification rule that you want to modify or delete and click Edit or Delete in the Actions column.
    Task Procedure
    Modify a notification rule
    1. Find the notification rule that you want to modify and click Edit in the Actions column.
    2. In the Edit Event Notification dialog box, reconfigure the Event parameter based on your business requirements.

      For more information about event types, see Create a notification rule.

    3. Click OK.
    Delete a notification rule
    1. Find the notification rule that you want to delete and click Delete in the Actions column.
    2. In the Delete Event Notification message, click OK.

View event notifications

In the Auto Scaling console, you can click a link to go to the CloudMonitor console or the MNS console to view events or messages.

  1. Log on to the Auto Scaling console.
  2. In the left-side navigation pane, click Scaling Groups.
  3. In the top navigation bar, select a region.
  4. Find a scaling group and go to the details page of the scaling group. You can use one of the following methods to go to the details page:
    • Click the ID of the scaling group in the Scaling Group Name/ID column.
    • Click Details in the Actions column of the scaling group.
  5. In the upper part of the page, click the Notifications tab.
  6. Find the notification rule and click the link in the Notification Method column.
  7. View events in CloudMonitor or messages in the MNS topic or queue.
    For information about the pricing of these resources, see Overview.
    • CloudMonitor: On the Event Monitoring page of the CloudMonitor console, select System Event and then Auto Scaling. All system events that are related to Auto Scaling appear on the page.
    • MNS topic: On the Topic List page of the MNS console, find the MNS topic whose messages you want to view and check whether the number in the Message Count column increases. If the number increases, new messages are received. You can view the message details on a subscription client.
    • MNS queue: On the Queue List page of the MNS console, find the MNS queue whose messages you want to view and check whether the number in the Active Messages column increases. If the number increases, new messages are received. Click Receive Message in the Actions column to view the message details.