nav-img
Advanced

Installing the Agents in Batches on Linux ECSs

Scenarios

This topic describes how to install Agents in batches on Linux ECSs.

Operation

After binding an elastic IP address to an ECS, install and configure the Agent by following instructions in Installing and Configuring the Agent on a Linux ECS or BMS to ensure that data collection is normal. Use the ECS as a jump server and run scripts in batches to copy, decompress, and install the Agent package and configuration file to other ECSs.

Notice
  • The ECSs where the Agent is to be installed in batches must belong to the same VPC.
  • Agents cannot be installed on Windows servers in batches.

Prerequisites

  • The IP addresses and password of user root of all ECSs for which the Agent is to be installed have been collected, sorted in the iplist.txt format, and uploaded to the /usr/local directory on the first ECS.
    Note

    In the iplist.txt file, each line contains only one IP address in the "IP address,Password of user root" format.

    In the following example, abcd is the password.

    192.168.1.1,abcd
    192.168.1.2,abcd

Procedure

  1. Use PuTTY to log in to the ECS on which the Agent has been installed as user root.
  2. Run the following command to download and run the batch installation script:

    cd /usr/local && curl -k -O https://uniagent-xx1.obs.xx1.xx2.com/package/batch_agent_install.sh && bash batch_agent_install.sh -r xx1 -u 0.2.1 -t 2.7.5 -o xx2.com -d ces.xx1.xx2.com

    ru-moscow-1:

    cd /usr/local && curl -k -O https://uniagent-ru-moscow-1.obs.ru-moscow-1.hc.sbercloud.ru/script/batch_agent_install.sh && bash batch_agent_install.sh -r ru-moscow-1 -u 0.1.4 -t 2.4.4.3 -d ces.ru-moscow-1.hc.sbercloud.ru
  3. Install the Agent in batches on Linux servers.
  4. If the following information is displayed, the Agent is successfully installed. Wait for 3 to 5 minutes and then the plug-in can collect monitoring data.

    Figure 1 Successful installation