Installing ICAgent (Non-HUAWEI CLOUD Hosts)
ICAgent is a log collection tool for LTS. To use LTS to collect logs from non-HUAWEI CLOUD hosts, you need to install ICAgent on the hosts.
ICAgent can be installed on non-HUAWEI CLOUD hosts only in the CN East-Shanghai1 and CN South-Guangzhou regions.
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
- Linux: ICAgent can only be installed on hosts running the Linux OSs listed in Supported Linux OSs.
- Windows: 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.
Installation Methods
There are two methods to install ICAgent.
| Method | Scenario |
|---|---|
| Initial installation | You can use this method to install ICAgent on a host that has no ICAgent installed. |
| Inherited installation (supported only for Linux hosts) | When ICAgent has already been installed on one host but needs to be installed on multiple hosts, you can use this method. |
Initial Installation (Linux)
Before installing ICAgent on a non-HUAWEI CLOUD host, purchase an ECS as a jump server from HUAWEI CLOUD. For details, see Using Multiple Jump Servers.
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 2.
Table 2 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 Linux.
- Select Non-HUAWEI CLOUD host for Host.
- Open the forwarding ports on the jump server.
- Enter the private IP address of the jump server and generate an SSH tunneling command, as shown in Figure 1.
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 2 is returned, the ports are open.
- 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, as shown in Figure 1.
- Obtain the AK/SK pair. For details, see How Do I Obtain an AK/SK Pair?
- Generate the ICAgent installation command and copy it.
- Enter the AK, SK, DC, and Connection IP to generate the ICAgent installation command, as shown in Figure 3.
- Ensure that the AK/SK pair is correct. Otherwise, ICAgent cannot be installed.
- DC: Specify a name for the data center of the host so it is easier to find the host.
- 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, DC, and Connection IP to generate the ICAgent installation command, as shown in Figure 3.
- Log in as user root to the host which is deployed in the region same as that you are logged in to (for example, by using a remote login tool such as PuTTY) and run the copied command to install ICAgent.
- When the message ICAgent install success is displayed, ICAgent has been installed in the /opt/oss/servicemgr/ directory of the host. 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.
Initial Installation (Windows)
Before installing ICAgent on a non-HUAWEI CLOUD host, purchase an ECS that runs Linux OS as a jump server from HUAWEI CLOUD. For details, see Using Multiple Jump Servers.
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 3.
Table 3 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.
- Open the forwarding ports on the jump server.
- Enter the private IP address of the jump server and generate an SSH tunneling command, as shown in Figure 4.
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 5 is returned, the ports are open.
- 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, as shown in Figure 4.
- 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, as shown in Figure 6.
- 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, as shown in Figure 6.
- 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.
Using Multiple Jump Servers
You can use multiple jump servers to prevent the risk of single point of failures and improve access reliability.
- Create an ECS that runs Linux OS as a jump server.
Configure the CPU and memory based on the service requirements. The recommended specifications are 2 vCPUs and 4 GB of memory, or above.
- Log in to the jump server as use root and use the internal IP address of the jump server to create an SSH tunnel.
- On the ECS console, locate the jump server and obtain its private IP address, as shown in Figure 7.
- On the LTS console, choose Host Management in the navigation pane, and click Install ICAgent in the upper right corner. In the dialog box displayed, select Linux for OS, select Non-HUAWEI CLOUD host for Host, and enter the private IP address to generate the SSH tunneling command. Log in to the jump server and run the command to create an SSH tunnel. Figure 8 Creating an SSH tunnel
- If there are multiple jump servers, repeat 2.b and add them to the same VPC. When creating ECSs, select the same VPC for Network, as shown in Figure 9.
- Create a load balancer by referring to Creating a Load Balancer. When creating the load balancer, you should:
- Select the same VPC as that of the jump servers.
- Create an EIP for connecting to the jump servers.
- Purchase the bandwidth based on the service requirements.
- Add listeners for TCP ports 30200, 30201, 8149, 8923, and 8102. For details, see Adding a TCP Listener.
- Add all jump servers to a backend server group. For details, see Adding or Removing Backend Servers.
Inherited Installation (Linux)
Let's assume that you need to install ICAgent on multiple hosts, and one of the hosts already has ICAgent installed. The ICAgent installation package, ICProbeAgent.tar.gz, is in the /opt/ICAgent/ directory. You can follow the directions below to install ICAgent on other hosts one by one.
- Run the following command on the host where ICAgent has been installed, where x.x.x.x is the IP address of the host you want to install ICAgent on.
bash /opt/oss/servicemgr/ICAgent/bin/remoteInstall/remote_install.sh -ip x.x.x.x
- Enter the password for user root of the host when prompted.
- If the Expect tool is installed on the host that has ICAgent installed, the ICAgent installation should be able to complete without prompting you for a password. Otherwise, enter the password as prompted.
- Ensure that user root can run SSH or SCP commands on the host where ICAgent has been installed to remotely communicate with the host to install ICAgent.
- When the message ICAgent install success is displayed, ICAgent has been installed in the /opt/oss/servicemgr/ directory of the host. 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.
Batch Inherited Installation (Linux)
Let's assume that you need to install ICAgent on multiple hosts, and one of the hosts already has ICAgent installed. The ICAgent installation package, ICProbeAgent.tar.gz, is in the /opt/ICAgent/ directory. You can follow the directions below to install ICAgent on other hosts in batches.
- The hosts must all belong to the same Virtual Private Cloud (VPC) and be on the same subnet.
- Python 2.7.* is required for batch installation. If you are prompted that Python cannot be found during ICAgent installation, install Python of a proper version and try again.
Prerequisites
The IP addresses and passwords of all hosts to install ICAgent have been collected, sorted in the iplist.cfg file, and uploaded to the /opt/ICAgent/ directory on the host that has ICAgent installed. Each IP address and password in the iplist.cfg file must be separated by a space, as shown in the following example:
192.168.0.109 Password (Replace the IP address and password with the actual ones)
192.168.0.39 Password (Replace the IP address and password with the actual ones)
- The iplist.cfg file contains sensitive information. You are advised to clear it after using it.
- If all hosts share a password, list only IP addresses in the iplist.cfg file and enter the password manually during execution. If one of the hosts uses a different password, type the password behind its IP address.
Procedure
- Run the following command on the host that has ICAgent installed:
bash /opt/oss/servicemgr/ICAgent/bin/remoteInstall/remote_install.sh -batchModeConfig /opt/ICAgent/iplist.cfg
Enter the password for user root of the hosts to install ICAgent. If the passwords of all hosts have been configured in the iplist.cfg file, press Enter to skip this step.
batch install begin Please input default passwd: send cmd to 192.168.0.109 send cmd to 192.168.0.39 2 tasks running, please wait... 2 tasks running, please wait... 2 tasks running, please wait... End of install agent: 192.168.0.39 End of install agent: 192.168.0.109 All hosts install icagent finish.
If the message All hosts install icagent finish. is displayed, ICAgent has been installed on all the hosts listed in the configuration file.
- Choose Host Management > Hosts on the LTS console to view the ICAgent status. For details, see ICAgent Status.
Last Article: Installing ICAgent (HUAWEI CLOUD Hosts)
Next Article: Upgrading ICAgent








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