This section describes how to create and customize event-triggered tasks.
- Log on to the Auto Scaling console.
- In the left-side navigation pane, choose .
- On the Event-Triggered tasks page, click Create Event-Triggered Task.
- In the Create Event-Triggered Task dialog box, configure the required options.
- Enter the Task Name.
- Enter the Description.
- You must select a group to monitor from the Resource Monitored field.
- Select a Monitoring Type.
- If you select the System Monitoring option, you must select a monitoring metric. For more information about metrics, see Event-triggered tasks of system monitoring.
- If you select the Custom Monitoring option, you are required to select the Group, Metric and Metric Type that are predefined in CloudMonitor. For more information about custom metrics, see Event-triggered tasks of custom monitoring.
- Select a Reference Period (Minutes).
Note You can select one the following options, such as 1, 2, 5, and 15. Auto Scaling collects, summarizes, and computes data based on the specified reference period. The smaller the granularity, the more easily an event will be triggered. You can select a rational reference period based on your business requirements.
- Configure the Condition.
Note You can set a condition to verify whether the value of a metric exceeds the specified threshold. Assume that the condition is met when the CPU usage rate is higher than 80%.
- Average: For all ECS instances in a scaling group, an event will be triggered when the average CPU usage rate is higher than 80%.
- Max: In a scaling group, for the ECS instance that has the highest CPU usage rate, an event will be triggered when its usage rage is higher than 80%.
- Min: In a scaling group, for the ECS instance that has the lowest CPU usage rate, an event will be triggered when its usage rage is higher than 80%.
- Select a Trigger After.
Note You can select one the following options, such as 1, 2, 3, and 5 times. When the value of a metric exceeds the threshold for specified times, an event is triggered, and the specified scaling rule is applied.
- Select a Triggered Rule to be applied when the value of a metric meets the specified condition.
- Click OK.