This topic describes how to create a host group with host identifiers.
Prerequisites
- A server is prepared as the log source. If the server is a VolcanoEngine ECS, it must be in the same region as the project.
- If you do not enable Volcano ECS, you must install LogCollector of version 1.0.3 or later versions on the server before adding multiple Volcano ECS servers to the host group. We recommend that you use the latest version. For download and installation instructions, see Install LogCollector (host machine).
Notice
Each Volcano Engine primary account can create up to 200 host groups in each region.
- Currently, only Linux servers are supported.
- Only LogCollector V1.0.8 and later versions support auto-upgrade. If you need to enable auto-upgrade, make sure all servers that are ready to join host group have the required version installed before you create the host group. Otherwise, LogCollectors that do not meet the version requirements can not be auto-upgraded. For upgrading LogCollector historical versions V1.0.7 and earlier, see Manually upgrade LogCollector.
- LogCollector does not support auto-upgrade in container scenarios. If needed, replace the image manually.
How to configure
1. Configure host identification (when Volcano ECS is disabled)
If you need to add a server to a host group with host identification, specify the label parameter during LogCollector initialization on the server and enter a custom identifier.
Notice
- The identifier length must be 2–128 characters. It can include lowercase letters, numbers, hyphens (-), and underscores (_).
- Host groups identify different containers by using IP addresses. By default, the IP address is the primary network interface address obtained by LogCollector. To make it easier to manage host groups, you can modify the IP address obtaining policy in LogCollector. For more details, see Set the IP address for the host or container.
If you do not specify the label parameter during initialization, you need to stop LogCollector first. Then re-run the initialization command with the correct parameter. After that, restart LogCollector. If you need to modify the machine identifier after setting it, you can follow the steps below.
sudo systemctl stop logcollectord.service
- Re-run the initialization command.
sudo ./logcollector.sh install --region {region} --endpoint {endpoint} --secret_id {secret_id} --secret_key {secret_key} --label {label}
sudo systemctl start logcollectord.service
2 Create a host group
- Select the region where torch log service is located from the top navigation bar.
- In the left navigation panel, select Resource management > Host Group.
- On the Host group management page, click Create host group.
- In the Create host group dialog box, enter the basic information for the host group, and then click Create.
View host group LogCollector connection status
The host machine with LogCollector installed regularly reports its heartbeat status to TLS. You can check whether LogCollector and TLS are connected properly based on the heartbeat status. After successfully creating a host group, you can click the host group name on the Host group management page to view the heartbeat status of each server in the host group.
The Heartbeat status tab displays the IP addresses in the IP column for servers with the same server identifier. Servers within the host group are identified and distinguished by their IP addresses. By default, IP address is the current server address obtained by LogCollector, i.e., the IP address of the first network card.
You can verify that the number of IP addresses matches the number of servers actually configured with identifiers, and view the heartbeat status of each server.
- If the status column shows Normal: TLS has successfully identified this server, and both the server LogCollector and TLS connection status are normal.
- If the status column shows Abnormal: some machines in the host group are in abnormal status. To view the IP addresses of servers with heartbeat anomalies, click the host group name.
Notice
- After adding servers to the host group, the server heartbeat status will briefly show as Abnormal until LogCollector successfully reports the heartbeat status to TLS. If the server heartbeat status shows Exception for more than 1 minute, see Machine group heartbeat problem troubleshooting (host) for troubleshooting.
- For host groups based on host identification, if you restart a server that is in abnormal status, the IP address of the server will change. TLS will fail to check the heartbeat status via original IP address. Therefore, the abnormal IP address record will remain. In this case, we recommend that you check the number of hosts with normal heartbeat status. If the number matches the actual number of servers, the error message for the abnormal status can be ignored.