Log Service manages all the Elastic Compute Service (ECS) instances whose logs need to be collected by using the Logtail client in the form of machine groups. You can go to the Machine Groups page by clicking a project name on the Project List page and then clicking LogHub - Collect > Logtail Machine Group in the left-side navigation pane on the Logstore List page. You can create, modify, and delete a machine group, view the machine group list and status, manage the configurations, and use the machine group identification in the Log Service console.

Create a machine group

You can define a machine group by using:
  • IP: Define the machine group name and add the intranet IP addresses of a group of machines.
  • User-defined identity: Define an identity for the machine group and configure the identity on the corresponding machine for association.

For how to create a machine group, see Create a machine group.

View machine group list

  1. Log on to the Log Service console.
  2. On the Logstore List page, click Logtail Machine Group in the left-side navigation pane. The Machine Groups page appears. 

    View all of the machine groups in the project.

    Figure 1. View a list of machine groups


Modify a Machine Group

After creating a machine group, you can adjust the ECS instances in the machine group as per your needs.

Note
The machine group name cannot be modified after the machine group is created.
  1. Log on to the Log Service console.
  2. On the Logstore List page, click Logtail Machine Group in the left-side navigation pane. The Machine Groups page appears. 

    All machine groups under the project are displayed.

  3. Click Modify at the right of the machine group.
  4. Modify the configurations and then click Confirm.
Figure 2. Modify a Machine Group


View status

To verify that the Logtail client is successfully installed on all ECS instances in a machine group, view the heartbeat status of the Logtail client.

  1. Log on to the Log Service console.
  2. On the Project List page, click the project name. On the Logstore List page, click LogHub - Collect > Logtail Machine Group in the left-side navigation pane.  The Machine Groups page appears. 
  3. Click Machine Status at the right of the machine group.

    If the Logtail client is successfully installed on all ECS instances, If the heartbeat status of the ECS instances are OK. If the heartbeat status is FAIL, we recommend that you find the reason as instructed on the page. If the issue cannot be solved by yourself, open a ticket for help.

    Figure 3. View the machine group status


    Note
    • The heartbeat status OK indicates that the Logtail client properly connects to Log Service. After a machine is added to a machine group, a delay of several minutes might exist before you view the heartbeat status OK, so be patient.
    • If the heartbeat status of an ECS instance is always FAIL, see Linux  and Install Logtail on Windows.

Managing configurations

Log Service manages all the servers whose logs need to be collected by using machine groups. One important management item is the collection configuration of the Logtail client. For more information, see Collect text logs and Syslog.  You can apply or delete a Logtail configuration to/from a machine group to decide what logs are collected, how the logs are parsed, and to which Logstore the logs are sent by the Logtail on each ECS instance.

  1. Log on to the Log Service console.
  2. On the Logstore List page, click Logtail Machine Group in the left-side navigation pane. The Machine Groups page appears. 
  3. Click Config at the right of the machine group.
  4. Select the Logtail configuration and click Add or Remove to add or remove the configuration to/from the machine group.

    After a Logtail configuration is added, it is issued to the Logtail client on each ECS instance in the machine group.  After a Logtail configuration is removed, it is removed from the Logtail client.

Figure 4. Managing Machine Group configurations


Delete a machine group

  1. Log on to the Log Service console.
  2. On the Project List page, click the project name. On the Logstore List page, click LogHub - Collect > Logtail Machine Group in the left-side navigation pane.  The Machine Groups page appears. 
  3. Click Delete at the right of the machine group.
  4. Click Confirm in the appeared dialog box.
    Figure 5. Delete a machine group