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

Installing the Agent

This section describes how to install the Agent for an existing BMS. The procedure is as follows:

  1. Adding the Resolved Domain Names: Add the resolved domain names of regions to the /etc/resolv.conf file on the BMS.
  2. Configuring the Security Group: Download the Telescope package, send metrics, and collect logs.
  3. Installing the Agent: Manually install the Agent on the BMS.

Adding the Resolved Domain Names

  1. Log in to the BMS as user root.
  2. Enter vi /etc/resolv.conf to open the /etc/resolv.conf file.
  3. Add nameserver 100.125.1.250 and nameserver 100.125.21.250 to the file, as shown in Figure 1.
    Figure 1 Adding the resolved domain names

    The values of nameserver vary depending on the region.

    CN North-Beijing1: 100.125.1.250 and 100.125.21.250

    CN North-Beijing4: 100.125.1.250 and 100.125.129.250

    CN East-Shanghai1: 100.125.1.250,100.125.64.250

    CN South-Guangzhou: 100.125.1.250 and 100.125.136.29

    CN-Hong Kong: 100.125.1.250, 100.125.3.250

    AP-Bangkok: 100.125.1.250,100.125.3.250

    LA-Santiago: 100.125.1.250

  4. Press Esc and enter :wq! to save the configuration.

Configuring the Security Group

  1. On the page showing the BMS details, click the Security Groups tab.
  2. Click to expand the security group details, showing the configured security group rules.
  3. In the upper right corner of the rule list, click the security group ID to go to the Security Groups page.
    Figure 2 Security group rules
  4. In the Operation column, click Manage Rule. On the Outbound Rules tab page, click Add Rule to add a rule based on Table 1.
    Table 1 Security group rules

    Direction

    Protocol

    Port

    Destination IP address

    Description

    Outbound

    TCP

    80

    100.125.0.0/16

    Used to download the Agent installation package from the OBS bucket to the BMS and obtain the metadata and authentication information of the BMS.

    Outbound

    TCP and UDP

    53

    100.125.0.0/16

    Used by DNS to resolve domain names, for example, resolve the OBS domain name when users are downloading the Agent installation package, and resolve the Cloud Eye endpoint when the Agent is sending monitoring data to Cloud Eye.

    Outbound

    TCP

    443

    100.125.0.0/16

    Used to collect monitoring data that will be sent to Cloud Eye.

Installing the Agent

  1. Run the following command to install the Agent:

    CN North-Beijng1 (x86):

    cd /usr/local && curl -k -O https://obs.cn-north-1.myhuaweicloud.com/uniagent-cn-north-1/script/uniagent_install_amd64.sh && bash uniagent_install_amd64.sh

    CN North-Beijing1 (Kunpeng):

    cd /usr/local && curl -k -O https://obs.cn-north-1.myhuaweicloud.com/uniagent-cn-north-1/script/uniagent_install_arm64.sh && bash uniagent_install_arm64.sh

    CN North-Beijng4 (x86):

    cd /usr/local && curl -k -O https://obs.cn-north-4.myhuaweicloud.com/uniagent-cn-north-4/script/uniagent_install_amd64.sh && bash uniagent_install_amd64.sh

    CN South-Guangzhou (x86):

    cd /usr/local && curl -k -O https://obs.cn-south-1.myhuaweicloud.com/uniagent-cn-south-1/script/uniagent_install_amd64.sh && bash uniagent_install_amd64.sh

    CN South-Guangzhou (Kunpeng):

    cd /usr/local && curl -k -O https://obs.cn-south-1.myhuaweicloud.com/uniagent-cn-south-1/script/uniagent_install_arm64.sh && bash uniagent_install_arm64.sh

    CN East-Shanghai1 (x86):

    cd /usr/local && curl -k -O https://obs.cn-east-3.myhuaweicloud.com/uniagent-cn-east-3/script/uniagent_install_amd64.sh && bash uniagent_install_amd64.sh

    CN East-Shanghai1 (Kunpeng):

    cd /usr/local && curl -k -O https://obs.cn-east-3.myhuaweicloud.com/uniagent-cn-east-3/script/uniagent_install_arm64.sh && bash uniagent_install_arm64.sh

    CN East-Shanghai2 (x86):

    cd /usr/local && curl -k -O https://obs.cn-east-2.myhuaweicloud.com/uniagent-cn-east-2/script/uniagent_install_amd64.sh && bash uniagent_install_amd64.sh

    CN East-Shanghai2 (Kunpeng):

    cd /usr/local && curl -k -O https://obs.cn-east-2.myhuaweicloud.com/uniagent-cn-east-2/script/uniagent_install_arm64.sh && bash uniagent_install_arm64.sh

    CN-Hong Kong

    cd /usr/local && wget https://telescope-ap-southeast-1.obs.ap-southeast-1.myhuaweicloud.com/scripts/agentInstall.sh && chmod 755 agentInstall.sh && ./agentInstall.sh

    AP-Bangkok:

    cd /usr/local && wget https://telescope-ap-southeast-2.obs.ap-southeast-2.myhuaweicloud.com/scripts/agentInstall.sh && chmod 755 agentInstall.sh && ./agentInstall.sh

    AP-Singapore:

    cd /usr/local && wget https://telescope-ap-southeast-3.obs.ap-southeast-3.myhuaweicloud.com/scripts/agentInstall.sh && chmod 755 agentInstall.sh && ./agentInstall.sh

    AF-Johannesburg:

    cd /usr/local && wget https://telescope-af-south-1.obs.af-south-1.myhuaweicloud.com/scripts/agentInstall.sh && chmod 755 agentInstall.sh && ./agentInstall.sh

    LA-Santiago:

    cd /usr/local && wget https://telescope-la-south-2.obs.la-south-2.myhuaweicloud.com/scripts/agentInstall.sh && chmod 755 agentInstall.sh && ./agentInstall.sh

    LA-Sao Paulo1:

    cd /usr/local && wget https://telescope-sa-brazil-1.obs.sa-brazil-1.myhuaweicloud.com/scripts/agentInstall.sh && chmod 755 agentInstall.sh && ./agentInstall.sh

    LA-Mexico City1:

    cd /usr/local && wget http://telescope-na-mexico-1.obs.na-mexico-1.myhuaweicloud.com/scripts/agentInstall.sh && chmod 755 agentInstall.sh && ./agentInstall.sh
    The Agent is installed successfully if the command output similar to Figure 3 is displayed.
    Figure 3 Successful installation
  2. After the installation is complete, configure the Agent as instructed in Manually Configuring the Agent for Linux.