Use tags to automatically add ECS instances to CloudMonitor application groups
Create Auto Scaling groups that launch ECS instances with specific tags, then configure tag-based rules in CloudMonitor to automatically add instances to application groups for centralized O&M.
Background information
-
CloudMonitor automatic grouping supports Elastic Compute Service (ECS) instances, ApsaraDB RDS, and Server Load Balancer (SLB). Other ECS resources, such as ENIs and disks, are not supported.
-
This example uses an ECS instance created by a scaling group with the
team:devtag.
Step 1: Create a tagged ECS instance in Auto Scaling
Log on to the Auto Scaling console.
-
Create a scaling group. Step 1: Create a scaling group.
For high-availability auto scaling, set Scaling Policy to Balanced Distribution Policy.
-
Create a scaling configuration and add the
team:devtag to the ECS instance. Step 2: Create a scaling configuration. -
In the scaling group list, click the scaling group name. On the Instances tab, view the ECS instances created by the scaling group.
Step 2: Create a CloudMonitor application group
-
Log on to the CloudMonitor console.
-
Create an application group. Create an application group.
Set the following parameters:
-
Creation method: Select Create Based on Tags.
-
Resource tag: Set the key to
team, the operator to Contain, and the value todev.
-
-
On the Application Groups page, select Resource Tag and search by tag key
team. -
Click the application group name to view its resources.
The ECS instance created by the scaling group is automatically added to the application group. View instance monitoring data in Cloud service monitoring.