Log Service allows you to define a machine group by using IP addresses. This topic describes how to create an IP address-based machine group.
Prerequisites
- A project and a Logstore are created. For more information, see Create a project and Create a Logstore.
- At least one server is available.
- Logtail is installed on each server.
- If you use an Elastic Compute Service (ECS) instance, make sure that the ECS instance belongs to the Alibaba Cloud account for which Log Service is activated and resides in the same region as your Log Service resources. For more information, see Install Logtail on ECS instances.
- If your server is an ECS instance that belongs to another Alibaba Cloud account, a server that is provided by a third-party cloud service provider, or a server that is deployed in a self-managed data center, you must select a network based on your business requirements and install Logtail on the server. For more information, see Install Logtail on a Linux server and Install Logtail on a Windows server. Important If your server is an ECS instance that belongs to another Alibaba Cloud account, a server that is provided by a third-party cloud service provider, or a server that is deployed in a self-managed data center, you must configure a user identifier for the server. For more information, see Configure a user identifier.
Procedure
- Obtain the IP addresses of servers. The IP addresses that are obtained by Logtail are recorded in the ip field of the app_info.json file.To view the app_info.json file, go to the following paths on the servers on which Logtail is installed:
- 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 how to view the IP address of a Linux server.
- Log on to the Log Service console.
- In the Projects section, click the project that you want to view.
- In the left-side navigation pane, choose .
- On the Machine Groups tab, choose .
- In the Create Machine Group panel, configure the parameters and click OK. The following table describes the parameters.
Parameter Description Name The name of the machine group. Important After the machine group is created, you cannot change the name of the machine group. Proceed with caution.Identifier The identifier of the machine group. Select IP Addresses. Topic The topic of the machine group. The topic is used to differentiate the logs that are generated by different servers. For more information, see Log topics. IP Addresses The server IP addresses that you obtained in Step 1. Important- To add multiple servers to the machine group, separate the IP addresses with line feeds.
- We recommend that you do not add Windows and Linux servers to the same machine group.
- View the status of the machine group.