Install and use the CloudMonitor agent

更新时间:
复制 MD 格式

This topic explains how to install the CloudMonitor agent on ENS compute instances, including bare metal servers, and view host and GPU monitoring data on the CloudMonitor console.

Use cases

This solution applies to the following scenarios:

  • Monitor basic metrics for an ENS compute instance, including a bare metal server, such as CPU, memory, disk, network, and GPU.

  • Install the CloudMonitor agent on multiple instances and use Cloud Assistant to run installation commands in bulk.

Prerequisites

  • You have activated the ENS service and created an ENS compute instance.

  • You have activated the CloudMonitor service.

  • Ensure the ENS compute instance can access the CloudMonitor server endpoint over the public network.

  • For bulk installation, ensure Cloud Assistant is installed and enabled on your ENS instances.

Overview

This solution involves the following steps:

  1. Install the CloudMonitor agent: Log on to an ENS instance to manually download and install the C++ version of the CloudMonitor agent.

  2. (Optional) Bulk install the CloudMonitor agent : If you need to install the agent on multiple instances, use Cloud Assistant to run the installation command in bulk.

  3. Verify the installation : Check whether the CloudMonitor agent is installed and running correctly.

  4. View host monitoring data : View monitoring metrics such as CPU, memory, disk, and network for the instance in the CloudMonitor console.

  5. (Optional) View GPU monitoring data : If the instance is equipped with a GPU, view GPU-related monitoring metrics.

Step 1: Install the CloudMonitor agent

Because an ENS compute instance is considered a non-Alibaba Cloud server, you need to manually install the CloudMonitor agent.

  1. Go to the host monitoring page on the CloudMonitor console.

  2. On the Host Monitoring page, click Actions > Manual Installation in the upper-right corner.

  3. In the Manual Installation dialog box, select the Third-party Host tab, select the operating system architecture that corresponds to your ENS instance, and copy the corresponding installation command from the console page.

    For Can the machine connect to the public network?, select Yes or No based on your environment.

  4. Remotely log on to the ENS instance and run the installation command. The following example uses a Linux system:

    # Run the command with the actual download URL provided in the console.
    CMS_AGENT_ACCESSKEY=<key1> CMS_AGENT_SECRETKEY=<key2> ARGUS_VERSION=4.0.0 /bin/bash -c "$(curl -s http://cms-download.aliyun.com/Argus/agent_install-2.0.1.sh)"
    Important

    Copy the installation command directly from the console. The command is automatically populated with the required keys.

    [root@sea ~]# CMS_AGENT_ACCESSKEY=etxxxjq CMS_AGENT_SECRETKEY=aUrFqxxxQcQ ARGUS_VERSION=4.0.0 /bin/bash -c "$(curl -s http://cms-download.aliyun.com/Argus/agent_install-2.0.1.sh)"
    [2026-02-12 19:01:31 CST] Downloading install package ...
    [2026-02-12 19:01:31 CST] networkType is classic
    [2026-02-12 19:01:31 CST] wget --no-verbose -e "http_proxy=" "http://cloudmonitor-agent.oss-cn-hangzhou.aliyuncs.com/Argus/4.0.0/cloudmonitor_linux64.tar.gz" -O "/usr/local/cloudmonitor_linux64.tar.gz" -t 3 --connect-timeout=2
    2026-02-12 19:02:00 URL:http://cloudmonitor-agent.oss-cn-hangzhou.aliyuncs.com/Argus/4.0.0/cloudmonitor_linux64.tar.gz [18902051/18902051] -> "/usr/local/cloudmonitor_linux64.tar.gz" [1]
    [2026-02-12 19:02:00 CST] exit code: 0
    [2026-02-12 19:02:00 CST] Verifying install package ...
    [2026-02-12 19:02:00 CST] tar -xOf /usr/local/cloudmonitor_linux64.tar.gz cloudmonitor/VERSION
    [2026-02-12 19:02:01 CST] passed
    [2026-02-12 19:02:01 CST] Installing argusagent 4.0.0 ...
    [2026-02-12 19:02:01 CST] mkdir -p "/usr/local/cloudmonitor"
    [2026-02-12 19:02:01 CST] chown -R root:root "/usr/local/cloudmonitor"
    [2026-02-12 19:02:01 CST] tar xf "/usr/local/cloudmonitor_linux64.tar.gz" -C "/usr/local"
    [2026-02-12 19:02:01 CST] rm -f "/usr/local/cloudmonitor_linux64.tar.gz"
    [2026-02-12 19:02:01 CST] mkdir -p "/usr/local/cloudmonitor/local_data/conf"
    [2026-02-12 19:02:01 CST] chown -R root:root "/usr/local/cloudmonitor/local_data/conf"
    [2026-02-12 19:02:01 CST] echo "cms.agent.accesskey=etxxxjq" >  "/usr/local/cloudmonitor/local_data/conf/accesskey.properties"
    [2026-02-12 19:02:01 CST] echo "cms.agent.secretkey=aUrlxxxQcQ" >> "/usr/local/cloudmonitor/local_data/conf/accesskey.properties"
    [2026-02-12 19:02:01 CST] mkdir -p /etc/cloudmonitor
    [2026-02-12 19:02:01 CST] chmod +x "/usr/local/cloudmonitor/cloudmonitorCtl.sh"
    [2026-02-12 19:02:01 CST] "/usr/local/cloudmonitor/cloudmonitorCtl.sh" install
    [2026-02-12 19:02:01 CST] /usr/local/cloudmonitor/bin/argusagent tool replace --file /usr/local/cloudmonitor/cloudmonitor.service.usr --output-file /etc/systemd/system/cloudmonitor.service BASE_PATH /usr/local/cloudmonitor
    [2026-02-12 19:02:01 CST] chmod a-x /etc/systemd/system/cloudmonitor.service
    [2026-02-12 19:02:01 CST] systemctl enable cloudmonitor.service
    Created symlink /etc/systemd/system/multi-user.target.wants/cloudmonitor.service → /etc/systemd/system/cloudmonitor.service.
    [2026-02-12 19:02:01 CST] systemctl daemon-reload
    [2026-02-12 19:02:02 CST] "/usr/local/cloudmonitor/cloudmonitorCtl.sh" start
    [2026-02-12 19:02:02 CST] systemctl start cloudmonitor.service
    [2026-02-12 19:02:03 CST] argusagent daemon processId: 156902
    [2026-02-12 19:02:03 CST] readlink /proc/156902/exe => /usr/local/cloudmonitor/bin/argusagent
    [2026-02-12 19:02:03 CST] argusagent start success!
    [2026-02-12 19:02:03 CST] Installing loongcollector ...
    [2026-02-12 19:02:03 CST] REGION_ID not set, skipping loongcollector installation
    [2026-02-12 19:02:03 CST] /usr/local/cloudmonitor/bin/argusagent -v
    [2026-02-12 19:02:03 CST] argusagent version 4.0.0 (last change:2025-09-23 09:45:35 CST) for linux-amd64 git branch  : merge_cms git commitId: 71cc41237dc83ce2ea114ebc9f33f6a219678a05
    [2026-02-12 19:02:03 CST] argusagent installed at 2026-02-12 19:02:03 CST
    [root@sea ~]#
    The message argusagent installed at YYYY-MM-DD hh:mm:ss indicates a successful installation.

Step 2 (Optional): Bulk install the CloudMonitor agent

To install the CloudMonitor agent on multiple ENS instances, use Cloud Assistant to run the installation command in bulk. This avoids logging on to each instance individually.

Prerequisites

You have installed Cloud Assistant on the ENS instances.

Procedure

  1. Go to the ENS Cloud Assistant page.

  2. On the ENS Instance tab, select the ENS instances where you want to install the CloudMonitor agent, and then click Execute Command.

  3. On the Create Command page, configure the following parameters and click Execute:

    1. Command Name: Enter a custom command name, such as Install CloudMonitor agent

    2. Command Type: Select Shell.

    3. Command Content: Paste the download and installation command that you obtained from the console in Step 1 into the command content field.

    4. Timeout: A timeout of 120s is recommended.

      Note

      For commands that involve downloads and installations, make sure to set a timeout that is longer than the total installation time.

  4. After the command runs, check the execution results on the Cloud Assistant page to verify a successful installation for each instance.

Step 3: Verify the installation

  1. Log on to the ENS instance or use Cloud Assistant to run the following command to check the status of the CloudMonitor agent:

    ps aux | grep argusagent | grep -v grep

    If a result similar to the following is returned, the agent is running correctly:

    [root@sea ~]# ps aux | grep argusagent | grep -v grep
    root      156902  0.0  0.0 134416  6612 ?        Ss   Feb12   0:00 /usr/local/cloudmonitor/bin/argusagent -d
    root      156903  0.6  0.5 2369540 44984 ?        Sl   Feb12   6:01 /usr/local/cloudmonitor/bin/argusagent
    [root@sea ~]#
  2. Go to the CloudMonitor console - Host Monitoring, and verify that the Agent Status for the target instance is Running.

    Note

    After the agent is installed, it may take a few minutes for monitoring data to appear in the console.

Step 4: View host monitoring data

After you install the CloudMonitor agent, you can view host monitoring data for your ENS instance on the CloudMonitor console.

  1. Go to the host monitoring page on the CloudMonitor console.

  2. In the host monitoring list, find the target ENS instance, and click the instance name or click Monitoring Charts in the Actions column.

    Note

    You can select Non-ECS from Host Type to quickly filter for ENS instances.

  3. On the monitoring details page, view the following monitoring categories:

    For more information about host monitoring, see Monitor a host.
    1. OS Monitoring: Includes metrics such as CPU Usage, Memory Usage, System Average Load, and Disk Usage.

      This category also includes Disk Read/Write Bytes (B/s) and Disk Read/Write IOPS (count/s). Trend charts for these metrics are available for time ranges from 1 hour to 14 days.

    2. Process Monitoring: Mainly includes Top 5 process monitoring.

      Click the Process Monitoring tab. In the Top N Processes section, you can view line charts for metrics like CPU utilization. You can filter the data by time range, such as 1 hour, 6 hours, or 1 day.

    3. Network Monitoring: Includes metrics such as Network card bandwidth and Network Links.

Step 5 (Optional): View GPU monitoring data

If an ENS compute instance is equipped with a GPU, the CloudMonitor agent automatically collects GPU-related metrics.

  1. Go to the host monitoring page on the CloudMonitor console.

  2. Find the target GPU-equipped instance and click its name to open the monitoring details page.

  3. Click the GPU monitoring tab to view the following GPU monitoring metrics:

    For more information about GPU monitoring, see GPU monitoring.

    Metric

    Description

    GPU Utilization

    The utilization of the GPU computing cores.

    GPU Memory Usage

    The percentage of GPU memory that is in use.

    GPU Temperature

    The temperature of the GPU core.

    GPU Power Usage

    The real-time power consumption of the GPU.

    GPU Codec Utilization

    The utilization of the GPU encoder and decoder.

FAQ

No monitoring data after installation

  • Check the public network connectivity of the ENS instance to confirm that it can access the CloudMonitor server endpoint.

  • Verify that the agent is running correctly.

  • Wait about 5 minutes and then refresh the console page. It takes some time for a newly installed agent to report data.

Bulk installation fails

  • On the Cloud Assistant page, view the execution logs for the failed instances to identify the cause based on the error messages.

  • Confirm that Cloud Assistant is running correctly on the failed instances.

  • Confirm that network connectivity is working on the failed instances.