This topic describes how to install the Security Center agent on multiple Elastic Compute Service (ECS) instances at a time.

Background information

You must use the AccessKey pair of an Alibaba Cloud account that has the permissions to manage ECS instances. Only accounts with these permissions are allowed to install Cloud Assistant on ECS instances. Cloud Assistant is used to install the Security Center agent on multiple ECS instances at a time.

Procedure

  1. Download Alibaba Cloud CLI.
  2. Run the aliyun config command to configure your credentials in Alibaba Cloud CLI. If you do not configure your credentials, you cannot use Alibaba CLI to install Cloud Assistant. Configure user credentials
  3. Run the following commands to query the IDs and region IDs of the ECS instances on which you want to install Cloud Assistant.
    aliyun ecs DescribeRegions   #Query the region IDs.
    aliyun ecs DescribeInstances --RegionId [cn-hongkong]   #Query instance IDs in the specified region. This command queries instance IDs for only one region at each run. 
    Query instance IDs
  4. Run the following command to install Cloud Assistant. Alibaba Cloud CLI allows you to install Cloud Assistant on multiple ECS instances at a time.
    aliyun ecs InstallCloudAssistant --RegionId [TheRegionId] --InstanceId.N [i-bp1g6zv0ce8ogXXXXXXp]  #To install Cloud Assistant on multiple ECS instances, replace the N variable with the number of target ECS instances in sequence, and i-bp1g6zv0ce8ogXXXXXXp with the instance IDs obtained in step 3. 
    Note You can run the aliyun ecs DescribeCloudAssistantStatus --RegionId TheRegionId --InstanceId.1 i-bp1g6zv0ce8ogXXXXXXp --output cols=CloudAssistantStatus command to check whether the ECS instances have Cloud Assistant installed. For more information, see Install the Cloud Assistant client.
  5. Log on to the Security Center console. In the left-side navigation pane, click Settings. On the Agent tab of the Settings page, install the Security Center agent on multiple ECS instances at a time. Install the Security Center agent on multiple ECS instances at a time
Note The instance that has the Security Center agent installed is not displayed on the Agent tab. You can navigate to the Assets > Server(s) tab and view the status of the instance. The instance is displayed as Enable in the Agent column.

References

Troubleshoot why the Security Center agent is offline

Install the Security Center agent

Install the agent on servers in private networks