Help Center/ Cloud Eye/ User Guide/ Server Monitoring/ Installing the Agents in Batches on Linux ECSs
Updated on 2023-11-08 GMT+08:00

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.

  • 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.

    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:

    The script supports x86 and Kunpeng Arm-based ECSs.

  3. After the installation is complete, log in to the Cloud Eye console and choose Server Monitoring in the navigation pane on the left.
    View the list of ECSs on which the Agent has been installed.

    After you configure the Agent, its status is still displayed as Uninstalled because no monitoring data is reported yet. Wait 3 to 5 minutes and refresh the page.

  4. On the Server Monitoring page, select all ECSs and click Restore Agent Configurations.
  5. On the page that is displayed, click One-Click Restore.
  6. (Optional) If Pexpect is not required after the installation, run the following commands to delete Pexpect and Ptyprocess from the Python installation directory:

    cd /usr/lib/python2.7/site-packages

    rm pexpect-3.2-py2.7.egg-info -f

    rm ptyprocess-0.5.2-py2.7.egg-info -f

    rm pexpect -rf

    rm ptyprocess -rf