If you switch the network type of an Elastic Compute Service (ECS) instance from the classic network to a virtual private cloud (VPC), you must restart Logtail and update the configurations of the related machine group. This way, Logtail can continue to collect logs from the ECS instance.

Procedure

  1. Restart Logtail as an administrator.
    • Linux
      sudo /etc/init.d/ilogtaild stop
      sudo /etc/init.d/ilogtaild start
    • Windows
      1. Open the Run command window and enter services.msc to open the Services window.
      2. Restart the LogtailWorker service.
  2. Update the configurations of the machine group.
    • IP address-based machine group
      If your machine group is an IP address-based machine group, replace the IP address in the machine group with the IP address that is obtained after you restart Logtail. You can obtain the IP address from the ip field in the app_info.json file. The file path of app_info.json varies based on the operating system.
      • 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
    • Custom ID-based machine group

      If your machine group is a custom ID-based machine group, you do not need to update the configurations of the machine group.