You can use Log Service to install Logtail on Alibaba Cloud Elastic Compute Service (ECS) instances. This topic describes how to specify ECS instances in the Logtail configuration wizard and install Logtail.
- Log on to the Log Service console.
- In the Import Data section, select Delimiter Mode - Text Log.
In this example, Delimiter Mode - Text Log is selected as the data source. You can select another data source based on your business requirements.
- In the Specify Logstore step, select the destination project and Logstore, and then click Next.
You can also click Create Now to create a project and a Logstore.
- On the Create Machine Group tab, click ECS instances.
- Select ECS Instances.
You can use one of the following methods to select ECS instances.
Method Description Manually Select Instances You can select one or more instances from the instance list to install Logtail.
You can also filter instances by keyword, region, tag, status, billing method, and network type.
Specify Instance Tags You can attach tags to ECS instances. This allows you to categorize and manage the resources. For more information, see Create or bind a tag. After you attach the tags, you can specify one or more tags to select the instances. The system installs Logtail on all ECS instances to which the tags are attached.
A tag is a key-value pair. The tag key is required and the tag value is optional. If you select only the tag key, Logtail is installed on all ECS instances to which the tag key is attached.
Specify Resource Group You can configure resource groups for ECS instances to manage resources by hierarchy. For more information, see Resource groups. After you configure the resource groups, you can select a resource group. The system installs Logtail on all ECS instances in the resource group. Upload CSV File You can export a resource list from the ECS console as a comma-separated values (CSV) file. After you export the resource list, you can upload the CSV file. The system installs Logtail on all ECS instances in the list.
- Optional:Advanced configurations
Parameter Description Description Enter a description of the task. Execution Mode Select one of the following modes:
- Automatic: If Logtail fails to be installed on a machine, Log Service attempts to install Logtail on the next available machine.
- Suspend upon failure: If Logtail fails to be installed on a machine, Log Service attempts to install Logtail on the machine again.
Rate Control Select one of the following modes:
- Concurrency-based control: Install Logtail on the specified ECS instances at the same time.
- Batch-based control: Install Logtail on the specified ECS instances in batches.
Concurrency Specify the concurrency rate. It can be a number or a percentage. You must specify this parameter if you set Rate Control to Concurrency-based control.
For example, if you set the value to 2, Logtail is simultaneously installed on two ECS instances.
Batch Array Divide an execution task into multiple batches of tasks, and then run the tasks in a sequence of batches. The next batch of tasks starts to run only after the current batch of tasks is complete. You can create an array that consists of numbers or percentages to specify batches. You must specify this parameter if you set Rate Control to Batch-based control.
If you set the value to array [1, 5%, 10%], tasks are run based on this sequence. For example, one task is run in the first batch, 5% of the total tasks are run in the second batch, and 10% of the total tasks are run in the third batch. Then, all the subsequent batches are run until the tasks are complete.
Error Threshold Specify the maximum number or percentage of errors that are allowed before the specified tasks are stopped. Default value: 0.
For example, you want to install Logtail on four ECS instances, the Concurrency parameter is set to 1, and the Error Threshold parameter is set to 0. Logtail is simultaneously installed on four ECS instances. If Logtail fails to be installed on one of the ECS instances, the installation on the subsequent servers is canceled.
- Click Execute Now.
On the page that appears, you can view the install results. The install results include the basic information, instance list, and logs.