Updated on 2025-07-01 GMT+08:00

(New) Installing UniAgents

UniAgents centrally manage the life cycle of collection plug-ins and deliver instructions (such as script delivery and execution). UniAgents do not collect metric data themselves. O&M data is collected by collection plug-ins. You can install collection plug-ins through the access center and create collection tasks to collect metric data.

AOM allows you to install UniAgents on ECSs or other servers in or outside the current region.
  • Current region: Install UniAgents on the hosts in the region where the AOM console is located.
  • Outside current region: Install UniAgents on the hosts or non-Huawei Cloud hosts outside the region where the AOM console is located. For example, the hosts of self-built Internet Data Centers (IDCs), of third-party cloud vendors, or in the other regions of Huawei Cloud.

Prerequisites

  • You have determined the servers where UniAgent is to be installed and have obtained the accounts with the root permission and passwords for logging in to them.
  • To install UniAgent through a jump server, ensure that the jump server (where UniAgent has been installed) can communicate with the servers where UniAgent is to be installed.
  • Ensure that at least one access code is available. For details, see Managing Access Codes.

Constraints

  • For details about the Linux and Windows OSs supported by the UniAgent, see Collection Management Restrictions.
  • The UniAgent installation function (new) is not generally available. To use it, submit a service ticket.
  • To switch from the old UniAgent page to the new one, choose Settings > Collection Settings > UniAgents in the navigation tree on the left and click Try New Version in the upper right corner. To go to the old UniAgent page, click Back to Old Version in the upper right corner of the UniAgents page.
  • If the servers where UniAgent is to be installed contain CCE cluster-hosted servers, you are advised to install UniAgent on the K8s Clusters page.

Installation Methods

AOM allows you to install UniAgent on hosts. The following table lists the methods to install UniAgent.

Table 1 Installation methods

Method

Scenario

Install via Script (Recommended)

Suitable for initial installation and single-node installation scenarios. Use a remote login tool to log in to the host where UniAgent is to be installed and manually run the installation command. For details, see:

Install via Console

Applicable to the scenario where UniAgents are installed in batches on the AOM console. In the same VPC, use a jump server (an ECS where UniAgent has been installed) to install UniAgents on other ECSs in batches. For details, see Manually Installing UniAgents via Console (Current Region).

Ensure that a server with UniAgent installed is available. If UniAgent is installed for the first time, you need to install it using the script.

Script-based installation using a jump server

Applicable to the scenario where UniAgents are installed by running scripts on the jump server. Use a remote login tool to log in to the jump server (a server where UniAgent has been installed) and run scripts on it to install UniAgent on one or more servers.

Ensure that a server with UniAgent installed is available. If UniAgent is installed for the first time, you need to install it using the script.

Quickly Installing UniAgents Using Scripts (Current Region)

  1. Log in to the AOM 2.0 console.
  2. In the navigation pane on the left, choose Settings > Global Settings.
  3. On the displayed page, choose Collection Settings > UniAgents and click Try New Version in the upper right corner of the page.
  4. On the displayed page, click the ECS tab and click Install UniAgent.
  5. On the displayed page, select Install via Script (Recommended). (For servers on the Other tab page, UniAgents can be installed only by script. After you click Install UniAgent on this page, there is no need to select an installation scenario. The Install UniAgent page is directly displayed.)
  6. On the Install UniAgent page, set parameters to install a UniAgent.

    Figure 1 Installing a UniAgent
    Table 2 Installation parameters

    Parameter

    Description

    Example

    Server Region

    Select the region where the target cloud server is located. Options:

    • Current region: The network between AOM and the server in the current region is connected by default.
    • Outside current region: The server is in a region different from AOM. The network between AOM and the server is not connected by default. Select a network connection solution as required.

    Current region

    Server Type

    Options:
    • ECSs: hosts managed by the ECS service.
    • Other servers: other hosts.

    ECSs

    Installation Mode

    Option: CLI.

    You need to remotely log in to the server to run the installation command provided on the console.

    CLI

    OS

    Options: Linux and Windows.

    Linux

    UniAgent Version

    Select a UniAgent version. The latest version is selected by default.

    Latest Version

    Copy and Run Installation Command

    Command for installing the UniAgent. Commands for Linux and Windows are different.

    • If the ECS OS is Linux:
      1. Click Copy to copy the installation command.
        set +o history; 
        curl -k -X GET -m 20 --retry 1 --retry-delay 10 -o /tmp/install_uniagent https://aom-uniagent-***************.com/install_uniagent.sh;bash /tmp/install_uniagent -p ************************* -v 1.x.x -e xxxx -y ***********************************
        set -o history;
      2. Use a remote login tool to log in to the Linux server where the UniAgent is to be installed and run the copied installation command using an account with the root permission.

      If neither the UniAgent nor the ICAgent is installed, run the preceding command to install both of them. If either the UniAgent or the ICAgent is installed, run the preceding command to install the uninstalled one.

    • If the ECS OS is Windows (only the UniAgent can be installed in this mode):
      1. Log in to the Windows server where the UniAgent is to be installed.
      2. Download the installation package uniagentd-x.x.x.x-winxx.zip.

        If you need to verify the SHA256 value of the Windows installation package, check the file downloaded from https://aom-uniagent-{region_name}.obs.{region_name}.{site domain name suffix}/uniagentd-{version}-win32.zip.sha256.

      3. Decompress the package, click uniagentd.msi, and specify path C:\uniagentd for installation.
      4. (Optional) Modify the C:\uniagentd\conf\uniagentd.conf file and enter the following configuration (this step is required only when you need to install UniAgent 1.1.3 or earlier):

        master=https://xxxxxx.xxxxxxxxxxx,https://xx.xx.xx.xx:xxxxx

        project_id=xxxxxxxxxxxxxx

        public_net=xxxx

        Click Copy to copy the preceding configuration.

      5. Run start.bat in the C:\uniagentd\bin directory as the administrator.

    Copy and run the installation command.

  7. Check the UniAgent status in the UniAgent list.

Quickly Installing UniAgents Using Scripts (Outside Current Region)

  1. Log in to the AOM 2.0 console.
  2. In the navigation pane on the left, choose Settings > Global Settings.
  3. On the displayed page, choose Collection Settings > UniAgents and click Try New Version in the upper right corner of the page.
  4. On the displayed page, click the ECS tab and click Install UniAgent.
  5. On the displayed page, select Install via Script (Recommended). (For servers on the Other tab page, UniAgents can be installed only by script. After you click Install UniAgent on this page, there is no need to select an installation scenario. The Install UniAgent page is directly displayed.)
  6. On the Install UniAgent page, set parameters to install a UniAgent.

    Figure 2 Installing a UniAgent
    Table 3 Installation parameters

    Parameter

    Description

    Example

    Server Region

    Select the region where the target cloud server is located. Options:

    • Current region: The network between AOM and the server in the current region is connected by default.
    • Outside current region: The server is in a region different from AOM. The network between AOM and the server is not connected by default. Select a network connection solution as required.

    Outside current region

    OS

    Options: Linux and Windows.

    Linux

    Network

    Option: Internet. The regions that support connection to the Internet are CN North-Beijing4, CN East-Shanghai1, CN East-Shanghai2, and CN South-Guangzhou.

    After hosts outside the current region are connected to the public network, their data can be uploaded to AOM through the public network.

    Internet

    Copy and Run Installation Command

    Command for installing the UniAgent. Commands for Linux and Windows are different.

    • If the ECS OS is Linux:
      1. Click Copy to copy the installation command.
        set +o history;
        curl -k -X GET -m 20 --retry 1 --retry-delay 10 -o /tmp/install_uniagent https://aom-uniagent-***************.com/install_uniagent.sh;bash /tmp/install_uniagent -o public -p ************************* -e ******** -y ***********************************
        set -o history;
      2. Use a remote login tool to log in to the Linux server where the UniAgent is to be installed and run the copied installation command using an account with the root permission.

      If neither the UniAgent nor the ICAgent is installed, run the preceding command to install both of them. If either the UniAgent or the ICAgent is installed, run the preceding command to install the uninstalled one.

    • If the ECS OS is Windows (only the UniAgent can be installed in this mode):
      1. Log in to the Windows server where the UniAgent is to be installed.
      2. Download the installation package uniagentd-x.x.x.x-winxx.zip.

        If you need to verify the SHA256 value of the Windows installation package, check the file downloaded from https://aom-uniagent-{region_name}.obs.{region_name}.{site domain name suffix}/uniagentd-{version}-win32.zip.sha256.

      3. Decompress the package, click uniagentd.msi, and specify path C:\uniagentd for installation.
      4. Enter the following configuration (obtained from the installation page) to the C:\uniagentd\conf\uniagentd.conf file:

        master=https://xxx.xx.xxx.xxx:xxxxx

        project_id=******************

        public_net=xxx

      5. Run start.bat in the C:\uniagentd\bin directory as the administrator.

    Copy and run the installation command.

  7. Check the UniAgent status in the UniAgent list.

Manually Installing UniAgents via Console (Current Region)

  1. Log in to the AOM 2.0 console.
  2. In the navigation pane on the left, choose Settings > Global Settings.
  3. On the displayed page, choose Collection Settings > UniAgents and click Try New Version in the upper right corner of the page.
  4. On the displayed page, click the ECS tab and click Install UniAgent.
  5. Select Install via Console. (Only hosts on the ECS tab page support manual installation of UniAgents through the console.)
  6. On the Install UniAgent page, set parameters.

    1. Configure basic information, select a server, and click Next.
      Figure 3 Configuring basic information
      Table 4 Installation parameters

      Parameter

      Description

      Example

      Server Region

      The region where the target server is located can only be Current region.

      The network between AOM and the server in the current region is connected by default.

      Current region

      Server Type

      Only ECSs are supported.

      ECSs

      Installation Mode

      Options: CLI and GUI.

      GUI

      OS

      Options: Linux and Windows. (This parameter is required only when Installation Mode is CLI.)

      Linux

      UniAgent Version

      Select a UniAgent version. The latest version is selected by default.

      Latest Version

      Copy and run the installation command.

      Command for installing the UniAgent. Commands for Linux and Windows are different. (This parameter is required only when Installation Mode is CLI.) :

      • If the ECS OS is Linux:
        1. Click Copy to copy the installation command.
          set +o history; 
          curl -k -X GET -m 20 --retry 1 --retry-delay 10 -o /tmp/install_uniagent https://aom-uniagent-***************.com/install_uniagent.sh;bash /tmp/install_uniagent -p ************************* -v 1.x.x -e xxxx -y ***********************************
          set -o history;
        2. Use a remote login tool to log in to the Linux server where the UniAgent is to be installed and run the copied installation command using an account with the root permission.

        If neither the UniAgent nor the ICAgent is installed, run the preceding command to install both of them. If either the UniAgent or the ICAgent is installed, run the preceding command to install the uninstalled one.

      • If the ECS OS is Windows (only the UniAgent can be installed in this mode):
        1. Log in to the Windows server where the UniAgent is to be installed.
        2. Download the installation package uniagentd-x.x.x.x-winxx.zip.

          If you need to verify the SHA256 value of the Windows installation package, check the file downloaded from https://aom-uniagent-{region_name}.obs.{region_name}.{site domain name suffix}/uniagentd-{version}-win32.zip.sha256.

        3. Decompress the package, click uniagentd.msi, and specify path C:\uniagentd for installation.
        4. (Optional) Modify the C:\uniagentd\conf\uniagentd.conf file and enter the following configuration (this step is required only when you need to install UniAgent 1.1.3 or earlier):

          master=https://xxxxxx.xxxxxxxxxxx,https://xx.xx.xx.xx:xxxxx

          project_id=xxxxxxxxxxxxxx

          public_net=xxxx

          Click Copy to copy the preceding configuration.

        5. Run start.bat in the C:\uniagentd\bin directory as the administrator.

      Copy and run the installation command.

      Select Server

      Click Add Server. In the dialog box that is displayed, select the cloud server where the UniAgent is to be installed. (This step is required only when Installation Mode is GUI.)
      • On the Add Server page, select one or more servers. Only servers running Linux can be selected.
      • After selecting servers, perform the following operations if needed:
        • To remove a selected server, click Remove.
        • Filter servers by server ID or name.
        • Click and select or deselect columns to display.
        • Click to manually refresh the server list.

      Select servers.

    2. Check whether a transition host exists in the VPC to which the servers selected belong. (That is, check whether there is any server in the same VPC has been installed with the UniAgent. If yes, the server is automatically filtered out and used as a transition host.) Click Next. (This step is required only when Installation Mode is GUI.)
      Figure 4 Checking the transition host

      On the Check Transition Host page, perform the following operations if needed:

      • If there are multiple servers with the UniAgent installed in the VPC, click Change Transition Host in the Operation column of the VPC and select a desired host as the transition host.
      • If the UniAgent is not installed on any server in the VPC, click Set Transition Host in the Operation column of the VPC, copy the installation command, and manually run the installation command on a server to install the UniAgent and set the server to be a transition host.
      • Filter the list by VPC or Transition Host Set or Not.
      • Click and select or deselect columns to display.
      • Click to manually refresh the transition host list.
    3. Perform a connectivity test. (This step is required only when Installation Mode is GUI.)
      1. Set Account (with Root Permissions), Password, and Port for your server.
      2. Click Test in the Operation column.

      If multiple servers have the same account (with root permissions), password, and port number, select these servers, click Set Login Account and Password to set the account, password, and port number, and then click Test.

    4. After the connectivity test is successful, click Finish.

  7. Check the UniAgent status in the UniAgent list.

Installing a UniAgent on a Single Server by Using a Transition Host

Use a transition host with the UniAgent installed to remotely install the UniAgent on another server.

  • Prerequisites: The transition host (with the UniAgent installed) can communicate with the server where the UniAgent is to be installed. The SSH command can be executed.
  • Procedure
    1. Use a remote login tool to log in to the transition host (with the UniAgent installed) as the root user and run the following command:
      bash /usr/local/uniagentd/bin/remote_cmd.sh -ip x.x.x.x -command Installation command
      • x.x.x.x: indicates the IP address of the server where the UniAgent is to be installed.
      • Installation command: command used to install the UniAgent. You can copy the installation command from the installation page of the AOM console and replace the installation command in the preceding. (Do not include set +o history; or set -o history; when copying the installation command.)
    2. Enter the password of the root user of the server where the UniAgent is to be installed as prompted.

      If the message "UniAgent install success" is displayed, the UniAgent is successfully installed in the /usr/local/uniagentd directory. After the installation is successful, choose Collection Settings > UniAgents in the navigation pane on the AOM console to view the UniAgent status of the server.

Installing UniAgents on Multiple Servers in Batches by Using a Transition Host

Use a transition host with the UniAgent installed to remotely install UniAgents on other servers.

  • Prerequisites
    • The transition host (with the UniAgent installed) can communicate with the servers where the UniAgent is to be installed. The SSH command can be executed.
    • You have collected the IP addresses and passwords of the root user of all servers where the UniAgent is to be installed, sorted the information in iplist.cfg file, and uploaded the information to the /usr/local/uniagentd directory of the transition host. (This directory can be customized, but must be the same as the directory where the installation command is executed in the following installation procedure.) The following is an example of the iplist.cfg file (Separate IP addresses and passwords by spaces. Spaces are not allowed in other positions.):
      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)

      Because the iplist.cfg file contains sensitive information, you are advised to clear the information in time.

  • Procedure
    1. Use a remote login tool to log in to the transition host (with the UniAgent installed) as the root user.
    2. Run the following command:
      bash /usr/local/uniagentd/bin/remote_cmd.sh -batchModeConfig /usr/local/uniagentd/iplist.cfg -command "installation command"

      Installation command: command used to install the UniAgent. You can copy the installation command from the installation page of the AOM console and replace the installation command in the preceding. (Do not include set +o history; or set -o history; when copying the installation command.)

      If the message "UniAgent install success" is displayed, the UniAgent is successfully installed in the /usr/local/uniagentd directory. After the installation is successful, choose Collection Settings > UniAgents in the navigation pane on the AOM console to view the UniAgent status of the server.

Checking the UniAgent Status

On the UniAgents page, check the UniAgent status of the target host. For details, see Table 5.

Table 5 UniAgent statuses

Status

Description

Running

The UniAgent is working.

Offline

The UniAgent is abnormal.

Installing

The UniAgent is being installed. The installation takes about 1 minute to complete.

Installation failed

The UniAgent fails to be installed. Uninstall the UniAgent and then reinstall it.

Not installed

The UniAgent has not been installed.

After the UniAgent is installed on the host, ports 39338 and 39339 will be enabled to query log levels and collection tasks.

Other Operations

If needed, perform the following operations on the host where the UniAgent has been installed.

Table 6 Related operations

Operation

Description

Searching for a host

In the search box above the host list, search for a host by host ID, name, status, or IP address.

Refreshing the host list

Click in the upper right corner of the host list to refresh the list.

Customizing columns to display

Click in the upper right corner of the host list to select the columns to display.

Sorting hosts

In the table header of the host list, click in each column to sort hosts. indicates the default order, indicates the ascending order, and indicates the descending order.

Troubleshooting

If you encounter any problem when installing the UniAgent, see Collection Management FAQs.