To use LTS to collect logs (such as node logs, container logs, and standard output) from intra-region hosts, you must install ICAgent on them. ICAgent is a log collection tool for LTS. It runs on hosts where logs need to be collected.
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.
There are two methods to install ICAgent. Select one that best suits your needs.
Scenario | Description |
|---|---|
Initial installation | You can use this method to install ICAgent on a host that has no ICAgent installed. Run the following command on the host. If no ICAgent process is displayed, no ICAgent has been installed on the host.
|
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. |
Before installing ICAgent, ensure that the time and time zone of your local browser are consistent with those of the host.
For details, see How Do I Obtain an AK/SK Pair?
ICAgent retrieves Network Interface Card (NIC) information from the node by executing the ifconfig command. If the inet information is not present in the NIC configuration, the IPv4 address will not be reported, and -- will be displayed in the Host IPv4 Address column on the Hosts page. Similarly, if the inet6 information is not configured, the IPv6 address will not be reported, and -- will be displayed in the Host IPv6 Address column.
If the message "Service icagent installed successfully" is displayed, the installation is successful. Uninstalling ICAgent does not delete the files in the corresponding directories. You need to delete them manually if necessary.
ICAgent retrieves NIC information from the node by executing the ifconfig command. If inet information is not displayed in the NIC configuration, the IPv4 address is not reported, resulting in -- being displayed in the Host IPv4 Address column on the Hosts page. Windows does not support log reporting via IPv6.
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:
In inherited installation, the hosts must all belong to the same VPC and be on the same subnet.
bash /opt/oss/servicemgr/ICAgent/bin/remoteInstall/remote_install.sh -ip x.x.x.x
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.
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.
Perform the following operations:
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.
Wait for a while. When message "Install ICAgent success" is displayed, ICAgent has been installed on all the hosts listed in the configuration file.