All Products
Search
Document Center

Simple Log Service:How do I modify the configuration of a machine group after I switch the network type of an ECS instance from the classic network to a VPC?

Last Updated:Aug 25, 2023

If you use an IP address-based machine group when you use Logtail to collect text logs from an Elastic Compute Service (ECS) instance, you must restart Logtail and modify the configuration of the machine group after you switch the network type of the ECS instance from the classic network to a virtual private cloud (VPC). This ensures that Logtail continues to collect logs from the ECS instance.

Note

Simple Log Service allows you to create IP address-based machine groups and custom identifier-based machine groups. For more information, see Introduction. If you use a custom identifier-based machine group, you do not need to modify the configuration of the machine group after you switch the network type of an ECS instance.

Procedure

  1. Log on to the ECS instance on which Logtail is installed as an administrator.

  2. Restart Logtail.

    • Linux

      sudo /etc/init.d/ilogtaild stop
      sudo /etc/init.d/ilogtaild start
    • Windows

      1. Open the Run window and enter services.msc to open the Services window.

      2. If you use Logtail V1.0.0.0 or later, restart the LogtailDaemon service. If you use Logtail V0.x.x.x, restart the LogtailWorker service.

  3. View the IP address that is obtained by Logtail.

    1. 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 (64-bit)

      /usr/local/ilogtail/app_info.json

      64-bit Windows

      Logtail (64-bit)

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

      Logtail (32-bit)

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

      32-bit Windows

      Logtail (32-bit)

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

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

  4. Modify the configuration of the machine group.

    Replace the IP address in the machine group with the IP address of the ECS instance that is obtained after you restart Logtail. In this case, replace the IP address in the machine group with the value of the ip field in the app_info.json file.

    1. Log on to the Simple Log Service console .

    2. Find the machine group whose configuration you want to modify and change the IP address. For more information, see Manage machine groups.