Updated on 2022-02-21 GMT+08:00

Installing the ICAgent

The following table lists the ICAgent status.

Table 1 ICAgent status

Status

Description

Running

The ICAgent is running properly.

Uninstalled

The ICAgent is not installed. For details about how to install the ICAgent, see Installing the ICAgent.

Installing

The ICAgent is being installed. This operation takes about 1 minute to complete.

Installation failed

Failed to install the ICAgent on the host. Uninstall the ICAgent according to Uninstalling the ICAgent Through Logging In to a Server and then install it again.

Upgrading

The ICAgent is being upgraded. This operation takes about 1 minute to complete.

Upgrade failed

Failed to upgrade the ICAgent. Uninstall the ICAgent according to Uninstalling the ICAgent Through Logging In to a Server and then install it again.

Offline

The AK/SK are incorrect. Obtain the correct AK/SK and install the ICAgent again.

Abnormal

The ICAgent is abnormal. Contact technical support.

Prerequisites

Before installing the ICAgent, ensure that the time and time zone of the local browser are consistent with those of the server. If multiple servers are deployed, ensure that the local browser and multiple servers use the same time zone and time. Otherwise, the application topology and tracing data displayed on the UI may be incorrect.

Installation Methods

There are two methods to install the ICAgent. Note that the two methods are not applicable to the container nodes created using ServiceStage, Application Orchestration Service (AOS), or Cloud Container Engine (CCE). To monitor the container nodes using Application Performance Management (APM), perform operations according to Deploying Applications. For details, see Table 2.

Table 2 Installation methods

Method

Application Scenario

Initial installation

This method is used when the following conditions are met:

  1. An Elastic IP Address (EIP) has been bound to the server.
  2. The ICAgent has never been installed on the server.

Inherited installation

This method is used when the following conditions are met:

You have multiple servers on which the ICAgent is to be installed. One server is bound to an EIP, but others are not bound to an EIP. You can use this method to install the ICAgent on the servers that are not bound to an EIP.

Initial Installation

After you apply for a server and install the ICAgent for the first time, perform the following operations:

  1. Obtain the Access Key ID/Secret Access Key (AK/SK).

    • If you have obtained the AK/SK, skip this step.
    • For details about how to obtain the AK/SK, see Obtaining the AK/SK.

  2. Log in to the APM console.
  3. In the navigation pane, choose Agent > Management.
  4. Click Install ICAgent.
  5. Generate the ICAgent installation command and copy it.

    1. Enter the obtained AK/SK in the text box to generate the ICAgent installation command.

      Ensure that the AK/SK are correct. Otherwise, the ICAgent cannot be installed.

    2. Click Copy Command.

  6. Use a remote login tool, such as PuTTY, to log in to the server where the ICAgent is to be installed as the root user and run the command copied in 5.b to install the ICAgent:

    • If the message "ICAgent install success" is displayed, the ICAgent is successfully installed in the /opt/oss/servicemgr/ directory. After the ICAgent is successfully installed, choose Agent > Management in the navigation pane to view the ICAgent status.
    • If the installation fails, uninstall the ICAgent according to Uninstalling the ICAgent and then install it again. If the problem persists, contact technical support.

Inherited Installation

If the ICAgent has been installed on a server and the installation package ICProbeAgent.zip exists in the /opt/ICAgent/ directory of the server, use this method to install the ICAgent on a remote server with a few clicks.

  1. Run the following command (x.x.x.x indicates the server IP address) on the server where the ICAgent has been installed:

    bash /opt/oss/servicemgr/ICAgent/bin/remoteInstall/remote_install.sh -ip x.x.x.x

  2. Enter the password of the root user of the server where the ICAgent is to be installed as prompted.

    • If both the expect tool and the ICAgent have been installed on the server, the ICAgent will be installed on the remote server after the preceding command is executed. If the ICAgent has been installed on the server, but the expect tool has not, enter the information as prompted.
    • Ensure that the root user can run the SSH and SCP commands on the server where the ICAgent has been installed to communicate with the remote server where the ICAgent is to be installed.
    • If the message "ICAgent install success" is displayed, the ICAgent is successfully installed in the /opt/oss/servicemgr/ directory. After the ICAgent is successfully installed, choose Agent > Management in the navigation pane to view the ICAgent status.
    • If the installation fails, uninstall the ICAgent according to Uninstalling the ICAgent and then install it again. If the problem persists, contact technical support.

Inherited Batch Installation

If the ICAgent has been installed on a server and the installation package ICProbeAgent.zip exists in the /opt/ICAgent/ directory of the server, use this method to install the ICAgent on multiple remote servers with a few clicks.

  1. Ensure that you can run the SSH and SCP commands on the ECS server where the ICAgent has been installed to communicate with the remote ECS servers where the ICAgent is to be installed.
  2. Batch installation scripts depend on Python versions. You are advised to implement batch installation on hosts running Python 2.x. Python 3.x does not support batch installation.

Prerequisites

The IP addresses and passwords of all servers where the ICAgent is to be installed have been collected, sorted in the iplist.cfg file, and uploaded to the /opt/ICAgent/ directory on the server where the ICAgent has been installed. The following is an example of the iplist.cfg file, where IP addresses and passwords are separated by spaces.

192.168.0.109 password (Set the password as required.)

192.168.0.39 password (Set the password as required.)

  • Because the iplist.cfg file contains sensitive information, you are advised to clear the information after using it.
  • If the passwords of all servers are the same, you only need to list IP addresses in the iplist.cfg file and enter the password once during execution. If the password of an IP address is different from those of other IP addresses, you need to list both passwords and IP addresses in the iplist.cfg file.
  • The batch installation function depends on Python 2.7.*. If the system displays a message indicating that Python cannot be found during the installation, install Python 2.7.* and try again.

Procedure

  1. Run the following command on the server where the ICAgent has been installed:

    bash /opt/oss/servicemgr/ICAgent/bin/remoteInstall/remote_install.sh -batchModeConfig /opt/ICAgent/iplist.cfg

    Enter the default password of the root user of the server where the ICAgent is to be installed as prompted. If the passwords of all IP addresses have been configured in the iplist.cfg file, press Enter to skip this step. Otherwise, enter the default password.

    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 until the message "All hosts install icagent finish." is displayed, which indicates that the ICAgent has been successfully installed on all the hosts listed in the configuration file.

  2. After the ICAgent is successfully installed, choose Agent > Management in the navigation pane to view the ICAgent status.