Log Service now supports machine groups with IP addresses as identifiers. After adding the server IP addresses obtained by Logtail to the target machine groups, you can use the same Logtail Config to collect logs from the servers.
- You have created a project and a Logstore.
- You own at least one server. If the server is an Alibaba Cloud ECS server, make sure that the server is deployed in the region to which the project belongs.
- You have installed Logtail on the server. For details about how to install Logtail on a server, see Install Logtail in Linux and Install Logtail on Windows.
- For servers of other cloud providers, on-premises IDCs, and ECS servers under other Alibaba Cloud accounts, confirm that you have configured AliUids for them. For details about how to configure AliUids, see Collect logs from non-Alibaba Cloud ECS instances or ECS instances not in your account.
You can collect logs through the Alibaba Cloud intranet even if you have not configured an intranet IP address. Server logs can be collected and sent to Log Service through the Alibaba Cloud intranet only when you use an Alibaba Cloud ECS server, the ECS server is deployed in the region to which the project belongs, and you select Alibaba Cloud intranet (Classic Network and VPC) when installing Logtail.
- View the IP address of the server. The IP address is automatically generated by Logtail.
The IP address is recorded in the ip field in the app_info.json file.
You can view the file in the server with Logtail installed. The file path is:
- In Linux: /usr/local/ilogtail/app_info.json
- In Windows x64: C:\Program Files (x86)\Alibaba\Logtail\app_info.json
- In Windows x32: C:\Program Files\Alibaba\Logtail\app_info.json
The following figure shows an example IP address of a Linux server.
- Log on to the Log Service console and click the project name.
- Choose Machine Groups list. to view the
- In the upper-right corner, click Create Machine Group.
Alternatively, after creating a Logtail Config in the data access wizard, click Create Machine Group on the Apply to Machine Group page.
- Create a machine group.
- Enter a Name.
The name must be 3 to 128 characters in length and can contain lowercase letters, numbers, hyphens (-), and underscores (_). It must start and end with a lowercase letter or number.
- invalid content
Note Exercise caution when you set a name for the machine group because the name cannot be changed once it is set.
- Set Identification to IP Address.
- Enter an IP address.
The IP address is the server IP address you obtained from 1.Note
- You need to obtain the server IP address by following the instructions provided in 1.
- When multiple servers exist in the machine group, you need to use line breaks to separate the IP addresses of the servers.
- You cannot add both Windows servers and Linux servers to the machine group.
- Enter a Name.
- Optional: Enter a Topic.
For more information about machine group topics, see Log topic.
- Click Confirm.