Installing ICAgent (Windows)
ICAgent is a log collection tool for LTS. If you use LTS to collect logs from a host running Windows, you need to install ICAgent on the host.
Prerequisites
Ensure that the time and time zone of your local browser are consistent with those of the host to install ICAgent. If they are inconsistent, errors may occur during log reporting.
Restrictions
- ICAgent can only be installed on hosts running the following 64-bit Windows OSs:
Windows Server 2016 R2 Datacenter Windows Server 2016 R2 Standard Windows Server 2016 Datacenter English Windows Server 2016 R2 Standard English Windows Server 2012 R2 Datacenter Windows Server 2012 R2 Standard Windows Server 2012 Datacenter English Windows Server 2012 R2 Standard English Windows Server 2008 R2 Enterprise Windows Server 2008 R2 Standard Windows Server 2008 Enterprise English Windows Server 2008 R2 Standard English
- ICAgent installed on Windows hosts cannot be upgraded or uninstalled on the Host Management page. To use a newer ICAgent version, uninstall the original one and then install the newer version.
Procedure (HUAWEI CLOUD Hosts)
- Log in to the LTS console and choose Host Management in the navigation pane.
- Click Install ICAgent in the upper right corner.
- Set OS to Windows.
- Set Host to HUAWEI CLOUD host. Figure 1 Installing ICAgent
- Download the ICAgent installation package to the host.
You can download it by clicking the name of the package or copying the download URL to the address bar of your browser.
- Save the ICAgent installation package to a directory, for example, C:\ICAgent, and decompress the package.
- Enter the AK/SK pair in the text box to generate the ICAgent installation command. For details about how to obtain an AK/SK pair, see How Do I Obtain an AK/SK Pair?
If the AK/SK pair expires or is deleted, the ICAgent status may become abnormal. In this case, create a new AK/SK pair and generate a new installation command. Log in to the host and run the command to reinstall ICAgent.
- Click Copy Command to copy the ICAgent installation command.
- Open the Command Prompt, go to the directory where the ICAgent installation package is decompressed, and run the copied command. If the message Service icagent installed successfully is displayed, the installation is successful.
- If you have installed a third-party antivirus software, add ICAgent as a trusted program. Otherwise, ICAgent installation may fail.
- To uninstall ICAgent, go to the \ICProbeAgent\bin\manual\win directory where the ICAgent installation package was decompressed, and double-click the script named uninstall.bat. When the message icagent removed successfully is displayed, the uninstallation is successful.
Uninstalling ICAgent does not delete the files in the corresponding directories. You can delete them manually.
- To check the ICAgent status, go to the directory where the ICAgent installation package was decompressed, open the Command Prompt, and run the sc query icagent command. If RUNNING is returned, ICAgent is running. If the message The specified service does not exist as an installed service is displayed, ICAgent has been uninstalled.
- If you reinstall ICAgent after uninstallation and find that the ICAgent status is still pending, end the ICAgent process in Task Manager and try again.
Procedure (Non-HUAWEI CLOUD Hosts)
- ICAgent can be installed on non-HUAWEI CLOUD hosts only in the CN East-Shanghai1 region.
- For details about using multiple jump servers, see Using Multiple Jump Servers.
Before installing ICAgent on a non-HUAWEI CLOUD host, purchase an ECS that runs Linux OS as a jump server from HUAWEI CLOUD.
The minimum specifications for the ECS are 1 vCPUs and 1 GB of memory. The recommended specifications are 2 vCPUs and 4 GB of memory. You are advised to use an image of CentOS 6.5 64bit or later version.
- Log in to the ECS and modify its security group rules.
- On the ECS details page, click the Security Groups tab.
- Click a security group name and click Modify Security Group Rule in the upper right corner.
- On the security group details page, click the Inbound Rules tab and then click Add Rule. On the page displayed, add a security group rule based on Table 1.
Table 1 Security group rule Direction
Protocol
Port
Description
Inbound
TCP
8149, 8102, 8923, 30200, 30201, and 80
ICAgent will send data to the jump server through the listed ports.
Open the inbound ports 8149, 8102, 8923, 30200, 30201, and 80 to ensure that data can be transmitted from the non-HUAWEI CLOUD host to the jump server.
- Log in to the LTS console and choose Host Management in the navigation pane.
- Click Install ICAgent in the upper right corner.
- Set OS to Windows.
- Select Non-HUAWEI CLOUD host for Host.
- Enable forwarding ports on the jump server.
- Enter the private IP address of the jump server and generate an SSH tunneling command. Figure 2 Entering the private IP address of the jump server
The private IP address of the jump server refers to the internal IP address of the Virtual Private Cloud (VPC) where the jump server locates.
- Click Copy Command.
- Log in to the jump server as user root and run the SSH tunneling command:
ssh -f -N -L {Jump server IP address}:8149:{ELB IP address}:8149 -L {Jump server IP address}:8102:{ELB IP address}:8102 -L {Jump server IP address}:8923:{ELB IP address}:8923 -L {Jump server IP address}:30200:{ELB IP address}:30200 -L {Jump server IP address}:30201:{ELB IP address}:30201 -L {Jump server IP address}:80:icagent-{Region}.obs.{Region}.myhuaweicloud.com:80 {Jump server IP address}Enter the password of user root as prompted.
- Run the netstat -lnp | grep ssh command to check whether the corresponding TCP ports are being listened to. If the command output similar to Figure 3 is returned, the ports are enabled.
- Enter http://Jump server IP address in the address bar of a browser. If the access is successful, the security group rule has taken effect.
- If the jump server is powered off and restarted, run the preceding commands again.
- Enter the private IP address of the jump server and generate an SSH tunneling command.
- Download the ICAgent installation package as prompted.
- Save the ICAgent installation package to a directory on the Windows host, for example, C:\ICAgent, and decompress the package.
- Obtain the AK/SK pair. For details, see How Do I Obtain an AK/SK Pair.
- Generate the installation command and copy it.
- Enter the AK, SK, and Connection IP to generate the installation command. Figure 4 Obtaining the AK/SK pair
- Ensure that the AK/SK pair is correct. Otherwise, ICAgent cannot be installed.
- Connection IP: For EIP connection, use the EIP of the jump server. For VPC peer connection, use the internal IP address of the VPC where the jump server locates.
- Click Copy Command to copy the ICAgent installation command.
- Enter the AK, SK, and Connection IP to generate the installation command.
- Open the Command Prompt, go to the directory where the ICAgent installation package is decompressed, and run the copied command.
- If the message Service icagent installed successfully is displayed, the installation is successful. You can then view the ICAgent status on the Host Management > Hosts page of the LTS console.
- If the installation fails, uninstall ICAgent and reinstall it. If reinstallation fails, contact technical support.

Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.