This topic describes how to create an IP address-based machine group in the Log Service console.
- A project and a Logstore are created. For more information, see Create a Logtail project and a Logstore.
- At least one server is available.
- If Logtail is installed on an ECS instance, you must ensure that the ECS instance and Log Service project share the same Alibaba Cloud account and belong to the same region.
- If Logtail is installed on an ECS instance purchased by another Alibaba Cloud account, you must configure a user identifier before you create an IP address-based machine group. If Logtail is installed on the server that is provided by another cloud service vendor, or is a local IDC, you must also perform the preceding operation. For more information, see Configure an account ID for a server.
- Logtail is installed on the server. For more information, see Install Logtail in Linux and Install Logtail in Windows.
- Obtain the IP addresses of the servers.
The IP addresses obtained by Logtail are recorded in the ip field of the app_info.json file.On the servers where Logtail is installed, you can go to each of the following path to check the app_info.json file:
- Linux: /usr/local/ilogtail/app_info.json
- 64-bit Windows: C:\Program Files (x86)\Alibaba\Logtail\app_info.json
- 32-bit Windows: C:\Program Files\Alibaba\Logtail\app_info.json
The following figure shows the IP address of the server in Linux.
- Log on to the Log Service console.
- In the Projects section, click the name of the target project.
- In the left-side navigation pane, click Machine Groups.
- Click the icon next to Machine Groups, and select Create Machine Group from the shortcut menu.
- In the Create Machine Group dialog box, set the following required parameters, and then click OK.
Parameter Description Name The name of the machine group. It must be 3 to 128 characters in length, and can contain only lowercase letters, digits, hyphens (-), and underscores (_). The name must start and end with a lowercase letter or digit.Note After the machine group is created, you cannot change its name. Proceed with caution. Identifier Select IP Addresses. Topic The topic of the machine group. The topic is used to differentiate log data that is generated in different servers. For more information, see Configure a log topic. IP addresses Enter the IP addresses that are obtained in step 1.Note
- If a machine group contains multiple servers, you must separate the IP addresses with line breaks.
- Windows and Linux servers are not allowed in the same machine group.
- View the status of the machine group.
- In the Machine Groups list, click the name of the target machine group.
- In Machine Group Settings page, you can view the machine group status.
If the heartbeat status is OK, the server is connected to Logtail. If the status is FAIL, see What can I do if the Logtail client has no heartbeat?.