All Products
Search
Document Center

Simple Log Service:Create an IP address-based machine group

Last Updated:Feb 01, 2024

If you want to collect logs from servers, you must create a machine group and add the servers to the machine group. Simple Log Service allows you to create a machine group by using IP addresses. This topic describes how to create an IP address-based machine group.

Prerequisites

Procedure

Note

You can collect logs to Simple Log Service over an internal network of Alibaba Cloud only if you use an ECS instance and select the network type of Alibaba Cloud internal network when you install Logtail on the instance. An internal network refers to the classic network or a virtual private cloud (VPC).

  1. Obtain the IP addresses of servers.

    1. Log on to each server on which Logtail is installed.

    2. Open the app_info.json file.

      The following table describes the paths to the app_info.json file.

      Operating system

      Logtail

      Path to the app_info.json file

      Linux

      Logtail for 64-bit Windows

      /usr/local/ilogtail/app_info.json

      64-bit Windows

      Logtail for 64-bit Windows

      C:\Program Files\Alibaba\Logtail\app_info.json

      Logtail for 32-bit Windows

      C:\Program Files (x86)\Alibaba\Logtail\app_info.json

      32-bit Windows

      Logtail for 32-bit Windows

      C:\Program Files\Alibaba\Logtail\app_info.json

    3. View the value of the ip field in the app_info.json file.

      The value of the ip field indicates the IP addresses that are obtained by Logtail. The following figure shows the value of the ip field.IP地址

  2. Log on to the Simple Log Service console.

  3. In the Projects section, click the project that you want to manage.

  4. In the left-side navigation pane, choose Resources > Machine Groups.

  5. On the right of Machine Groups, choose 机器组 > Create Machine Group.

  6. In the Create Machine Group panel, configure the following parameters and click OK.

    Parameter

    Description

    Name

    Enter 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

    Select IP Addresses.

    Topic

    Specify the topic of the machine group. The topic is used to identify the logs that are generated by different servers. For more information, see Log topics.

    IP Addresses

    Enter the IP addresses of servers that you obtained in Step 1.

    Important
    • If you want to add multiple servers to the machine group, manually enter the IP addresses of the servers and separate the IP addresses with line feeds.

    • Do not add Windows and Linux servers to the same machine group.

  7. View the status of the machine group.

    1. In the Machine Groups list, click the machine group that you want to manage.

    2. On the Machine Group Settings page, view the server details and machine group status.

      If the value in the Heartbeat column for a server is OK, Logtail on the server is connected to Simple Log Service. If the value is FAIL, Logtail on the server is not connected. For more information about how to troubleshoot the issue, see How do I troubleshoot an error that is related to a Logtail machine group in a host environment?

      Important

      The creation process of a machine group requires approximately 2 minutes to complete. If the creation process is not complete, the heartbeat status is FAIL. In this case, click Refresh 2 minutes after you create the machine group.

      查看机器组状态