Updated on 2024-08-05 GMT+08:00

Installing an ICAgent

ICAgents collect metrics, logs, and application performance data in real time. For hosts purchased from the ECS or BMS console, you need to manually install the ICAgent. For hosts purchased from the CCE console, the ICAgent is automatically installed.

Prerequisites

  • Before installing an 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, metric data of applications and servers displayed on the UI may be incorrect.
  • An ICAgent process needs to be installed and run by the root user.

Installation Methods

There are two methods to install an ICAgent. Note that the two methods are not applicable to container nodes created through ServiceStage or CCE. For container nodes, you do not need to manually install an ICAgent. Instead, you only need to perform certain operations when creating clusters or deploying applications.

For details, see Table 1.

Table 1 Installation methods

Method

Scenario

Initial installation

This method is used when the following condition is met:

An ICAgent has never been installed on your server.

Inherited installation

This method is used when the following conditions are met:

You have multiple servers where an ICAgent is to be installed. One server is bound to an EIP, but others are not. An ICAgent has been installed on the server bound to an EIP by using the initial installation method. You can use the inherited method to install an ICAgent on the remaining servers.

See Inherited Installation.

Initial Installation

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

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

    • If you have obtained the AK/SK, skip this step.
    • If you have not obtained an AK/SK, obtain them first.

  2. In the navigation pane, choose Configuration Management > Agent Management.
  3. Select Other: custom hosts, and click Install ICAgent.
  4. Click Copy Command to copy the installation command.
  5. Use a remote login tool to log in to the target server as the root user, and run the following command to disable historical record collection:

    set +o history

  6. Run the copied installation command and enter the obtained AK and SK as prompted.
  7. After the ICAgent is installed, run the following command to enable historical record collection:

    set -o history

    • If the message ICAgent install success is displayed, the ICAgent has been installed in the /opt/oss/servicemgr/ directory. After the ICAgent has been installed, choose Configuration Management > Agent Management in the navigation pane to view the ICAgent status.
    • If the ICAgent fails to be installed, uninstall the ICAgent according to Uninstalling the ICAgent by Logging In to the Server and then install it again. If the problem persists, contact technical support.

Follow-up Operations

For more information about how to install, upgrade, and uninstall the ICAgent, see ICAgent Management.