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.
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
Log on to the ECS instance on which Logtail is installed as an administrator.
Restart Logtail.
Linux
sudo /etc/init.d/ilogtaild stop sudo /etc/init.d/ilogtaild start
Windows
Open the Run window and enter
services.msc
to open the Services window.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.
View the IP address that is obtained by Logtail.
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
View the value of the ip field in the app_info.json file.
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.
Log on to the Simple Log Service console .
Find the machine group whose configuration you want to modify and change the IP address. For more information, see Manage machine groups.