Help Center> Cloud Eye> User Guide (ME-Abu Dhabi Region)> Server Monitoring> Installing the Agents in Batches on Linux ECSs
Updated on 2024-04-03 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:

    UAE-Abu Dhabi

    cd /usr/local && wget https://telescope-ae-ad-1.obs.ae-ad-1.g42cloud.com/scripts/agentBatchPackage.sh && chmod 755 agentBatchPackage.sh && ./agentBatchPackage.sh
  3. Run the following command to run the script and enter the password (the passwords of multiple ECSs are the same):

    cd /usr/local && ./batchInstall.sh $password

    • If multiple passwords are involved in the configured iplist.txt, enter the preceding commands and passwords for multiple times. If the password of an ECS is incorrect, the Agent installation on the ECS will fail.
    • If the passwords of multiple ECSs are different, run the cd /usr/local && ./batchInstall.sh command.
    • Ensure that the ECSs are running during script execution.
  4. 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.

  5. On the Server Monitoring page, select all ECSs and click Restore Agent Configurations.
  6. On the page that is displayed, click One-Click Restore.
  7. (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