# Installing the ICAgent

ICAgent is the collector of AOM. It runs on each host to collect metrics and logs in real time. Before using AOM, install the ICAgent. Otherwise, AOM cannot be used.

#### VM Mode

Prerequisite

- Before installing the ICAgent, ensure that the time and time zone of the local browser are consistent with those of the server. Otherwise, metric data of services and servers displayed on the console may be inaccurate.
- You have obtained an AK/SK. For details, see Obtaining an AK/SK.

Procedure

1. Log in to the management console.
2. Under Application, click Application Operations Management.
3. In the navigation pane, choose Agent Management.
4. Select Other: user-defined nodes, and click Install ICAgent.
5. Generate and copy the ICAgent installation command.
6. Use a remote login tool, such as PuTTY, to log in as the root user to the server where the ICAgent is to be installed, run the command copied in 5, and enter the obtained AK/SK as prompted 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 on the left, and select Other: user-defined nodes to view the ICAgent status of the server.
   - If the ICAgent fails to be installed, uninstall it according to Uninstalling the ICAgent and then install it again. If the problem persists, contact technical support.

#### Container Mode

After a cluster is created on the Cloud Container Engine (CCE) console, the system automatically installs the ICAgent on all hosts in the cluster. After the ICAgent is uninstalled, install it again according to the following procedure:

1. Log in to the management console.
2. Under Application, click Application Operations Management.
3. In the navigation pane, choose Agent Management.
4. Install the ICAgent. The ICAgent is installed in batches by cluster. That is, the ICAgent is installed on all hosts in a cluster at a time.

   1. Select Cluster: xxx (xxx indicates the name of the cluster created on the CCE console) from the drop-down list on the right of the page.
   2. Click Install ICAgent. In the displayed dialog box, click Yes.

   The ICAgent begins to be installed. Please wait. When the ICAgent status changes from Installing to Running, the ICAgent is successfully installed.

Parent topic: ICAgent Management