All Products
Search
Document Center

Auto Scaling:Manage event notification rules

Last Updated:Nov 30, 2023

The event notification feature allows Auto Scaling to send event notifications to CloudMonitor, Message Service (MNS) topics, or MNS queues after a specified type of event occurs. This topic describes how to create, modify, delete, and view event notification rules.

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 for which you want to enable the event notification feature resides. For more information, see Create a topic or Create a queue.

Background information

  • The event notification feature helps you learn the dynamic changes of your scaling group at the earliest opportunity and implement automatic O&M based on notifications. For more information, see Overview.

  • You cannot use the same recipient resource for different event notification rules in a scaling group. For example, if you create multiple event notification rules in a scaling group, the event notification rules cannot share the same CloudMonitor or MNS resource, such as the same MNS topic or queue.

Create an event notification rule

Note

You can create up to six event notification rules in 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 the region where Auto Scaling is activated.
  4. 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.
  5. In the upper part of the scaling group details page, click the Notification Rules tab.
  6. Click Create Advanced Rule.

  7. Configure parameters of the rule based on your business requirements.

    The following table describes the parameters.

    Parameter

    Description

    Notification Method

    Valid values:

    • CloudMonitor: If an event of the specified type occurs in the scaling group, Auto Scaling sends notifications to CloudMonitor. For more information, see View system events.

    • MNS Topic: If an event of the specified type occurs in the scaling group, Auto Scaling sends notifications to a specified MNS topic. For more information, see What is MNS?

    • MNS Queue: If an event of the specified type occurs, Auto Scaling sends notifications to a specified MNS queue. For more information, see What is MNS?

    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 is triggered, but ECS instances or elastic container instances are not added to the scaling group.

    • Scale-in Failed: A scale-in 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 unmet.

    • Scale-out Started: A scale-out is triggered, and ECS instances or elastic container instances start to be added to the scaling group.

    • Scale-in Started: A scale-in is triggered, and ECS instances or elastic container instances start to be removed from the scaling group.

    • Scheduled Task Expired: Auto Scaling sends notifications on a daily basis 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.

    • Scaling Group Diagnosis: Auto Scaling diagnoses the health status of the scaling group. The diagnosed items include critical resource status, resource quota usage, resource billing status, and resource inventory status.

    • Partially Successful Scale-out: A scale-out is triggered, but not all ECS instances or elastic container instances are added to the scaling group.

    • Partially Successful Scale-in: A scale-in is triggered, but not all ECS instances or elastic container instances are removed from the scaling group.

  8. Click OK.

Modify or delete an event notification rule

If you want Auto Scaling to send notifications when a different type of event occurs in your scaling group, you can modify your event notification rule without creating a new event notification rule. Take note that you cannot modify the Notification Method parameter of an existing event notification rule. If you no longer require your even notification rule, you can delete the event 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 the region where Auto Scaling is activated.
  4. 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.
  5. In the upper part of the scaling group details page, click the Notification Rules tab.
  6. Find the event notification rule that you want to modify or delete and click Edit or Delete in the Actions column.

    Option

    Procedure

    Modify an event notification rule

    1. Find the event 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 an advanced notification rule.

    3. Click OK.

    Delete an event notification rule

    1. Find the event notification that you want to delete and click Delete in the Actions column.

    2. In the Delete Event Notification message, click OK.

View an event notification rule

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 the region where Auto Scaling is activated.
  4. 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.
  5. In the upper part of the scaling group details page, click the Notification Rules tab.
  6. Find the event 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 more information, 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 of the topic.

    • 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.