Installing ICAgent (Intra-Region Hosts)
To use LTS to collect logs (such as host metrics, container metrics, node logs, container logs, and standard output logs) from intra-region hosts, you need to install ICAgent on the hosts. ICAgent is a log collection tool for LTS. It runs on hosts where logs need to be collected.
Prerequisites
Before installing ICAgent, ensure that the time and time zone of your local browser are consistent with those of the host. If they are inconsistent, errors may occur during log reporting.
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. Run the ps -aux | grep icagent command on the host to check whether there is an ICAgent process. If no, the ICAgent has not been 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)
- Log in to the management console and choose Management & Deployment > Log Tank Service.
- Choose Host Management > Hosts in the navigation pane.
- Click Install ICAgent in the upper right corner.
NOTE:
Before installing ICAgent, ensure that the time and time zone of your local browser are consistent with those of the host.
Table 2 Installing ICAgent Parameter
Description
Example
Host
Intra-region hosts is selected by default. Check whether the host whose logs need to be collected is in or out of the region.
-
OS
Linux is selected by default.
-
Installation Mode
- If you select Obtain AK/SK, you need to obtain the AK/SK in advance. An AK is used together with an SK to sign requests cryptographically, ensuring that the requests are secret, complete, and correct.
For details, see How Do I Obtain an Access Key (AK/SK)?
NOTE:
Ensure that the public account and AK/SK will not be deleted or disabled. If the AK/SK is deleted, the ICAgent cannot report data to LTS.
- If you select Create an agency, you do not need to obtain and enter the AK/SK. ICAgent automatically obtains the AK/SK during agency creation.
For details, see How Do I Install ICAgent by Creating an Agency?.
-
Figure 1 Installing ICAgent - If you select Obtain AK/SK, you need to obtain the AK/SK in advance. An AK is used together with an SK to sign requests cryptographically, ensuring that the requests are secret, complete, and correct.
- On the Install ICAgent page, click Copy Command to copy the ICAgent installation command.
- Log in as user root to the host which is deployed in the region same as that you are logged in to (by using a remote login tool such as PuTTY) and run the copied command. If you have chosen Obtain AK/SK as the installation mode, enter the AK/SK as prompted.
NOTE:
- When message ICAgent install success is displayed, ICAgent has been installed in the /opt/oss/servicemgr/ directory of the host.
- If the installation fails, uninstall ICAgent and then install it again.
- Choose Host Management > Hosts in the navigation pane of the LTS console and check wether the ICAgent status is Running.
Inherited Installation (Linux)
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. 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.
NOTE:
- 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 remote host to install ICAgent.
- When message ICAgent install success is displayed, ICAgent has been installed in the /opt/oss/servicemgr/ directory of the host. You can then choose Host Management > Hosts in the navigation pane of the LTS console to check the ICAgent status.
- If ICAgent install success is not displayed, the installation fails. Uninstall ICAgent and install it again.
Batch Inherited Installation (Linux)
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. In this case, you can follow the directions below to install ICAgent on other hosts in batches.
- The hosts must all belong to the same VPC and be on the same subnet.
- Python 3.* is required for batch installation. If you are prompted that Python cannot be found during ICAgent installation, install Python of a proper version on the host and try again.
Prerequisites
The IP addresses and root's 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. An IP address and the password of a host's user root in the iplist.cfg file must be separated by a space. Examples:
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 default 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.
Wait for a while. When 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 in the navigation pane of the LTS console to check the ICAgent status.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.