All Products
Search
Document Center

CloudMonitor:Install and uninstall the CloudMonitor agent

Last Updated:Mar 05, 2025

The CloudMonitor agent can be used to collect metric data at the operating system level of a host and report the metric data to CloudMonitor for data statistics. The data can be presented in the form of visualized charts to help you learn about dynamic metrics in a timely manner. You can configure alert rules for important metrics to detect issues in a timely manner. This topic describes how to install and uninstall the CloudMonitor agent on a host.

Important

You can manage the CloudMonitor agent only by using an administrator account. For Linux operating systems, use the root user account. For Windows operating systems, use the Administrator account. If you use an administrator account, certain risks may occur. For example, system stability or data security issues may occur. Proceed with caution.

Background information

  • Versions of the CloudMonitor agent

    Programming language

    Status

    Description

    Installation

    Java

    Discontinued

    If you have installed the CloudMonitor agent for Java or Go, upgrade the agent to the CloudMonitor agent for C++ based on the instructions described in this topic.

    You are not charged for installing the CloudMonitor agent. You can view the metrics and their monitoring charts on the Host Monitoring page. You can configure alert rules free of charge for desired metrics and directly use CloudMonitor Basic without activating it.

    Go

    C++

    Available

    We recommend that you install the CloudMonitor agent for C++.

    Note

    For more information about the versions of the CloudMonitor agent, operating system requirements, installation location, running processes, ports, resource consumption, and logs, see Agent overview.

  • Installation methods of the CloudMonitor agent

    • Alibaba Cloud hosts: Elastic Compute Service (ECS) instances and simple application servers. To view the monitoring charts and alert rules of simple application servers, perform the following steps: Log on to the CloudMonitor console. In the left-side navigation pane, choose Cloud Resource Monitoring > Cloud Service Monitoring. On the Cloud Service Monitoring page, find and click Simple Application Server.

    • Third-party hosts: on-premises data centers, Tencent Cloud hosts, and AWS hosts

      Host status

      Description

      Managed by Alibaba Cloud

      After you register a third-party host as an Alibaba Cloud managed instance by using Cloud Assistant of ECS, you can view the host on the Host Monitoring page and the CloudMonitor agent is automatically installed on the host.

      Not managed by Alibaba Cloud

      You must manually install the CloudMonitor agent on a third-party host that is not managed by Alibaba Cloud. After you install the CloudMonitor agent, you can view the host on the Host Monitoring page.

Automatic installation (recommended)

We recommend that you use the related features in the CloudMonitor console to automatically install the CloudMonitor agent on Alibaba Cloud hosts and third-party hosts.

  1. Log on to the CloudMonitor console.

  2. In the left-side navigation pane, click Cloud Resource Monitoring > Host Monitoring.

  3. On the Host Monitoring page, select the hosts on which you want to install or upgrade the CloudMonitor agent and click Batch Install. Click OK.

    Note
    • For newly purchased ECS instances, you can turn on Automatically Install CloudMonitor Agent on Newly Purchased ECS Instances in the upper-right corner. If you turn off the switch, you must manually install the CloudMonitor agent on each ECS instance.

    • The installation or upgrade process requires about 5 minutes to complete. When the agent status changes from Installing to Running, the CloudMonitor agent is installed or upgraded.

Manual installation (script)

Note

If the CloudMonitor agent fails to be automatically installed or upgraded on a host, you must manually install the agent by using a script. You must uninstall the CloudMonitor agent first. For more information, see How do I uninstall the CloudMonitor agent?

  1. Log on to the CloudMonitor console.

  2. In the left-side navigation pane, click Cloud Resource Monitoring > Host Monitoring.

  3. On the Host Monitoring page, find the host and click the image icon in the Agent Status column. If the host does not exist, click Agent Operation in the upper part of the host list and then select Manual Installation from the drop-down list.

  4. In the Manual installation dialog box, perform the operations based on your business requirements.

    Host type

    Linux

    Windows

    Alibaba Cloud host

    1. In the Installation Command section, click the image.png icon next to the command to copy the command.image

      Important

      Region: You must select the region in which your host resides.

    2. Log on to the host on which you want to install the CloudMonitor agent as the root user.

    3. Paste and run the command to install the CloudMonitor agent.

    4. Run the following command to view the status of the CloudMonitor agent:

      ps aux | grep argusagent | grep -v grep

      The following output indicates that the CloudMonitor agent is running properly:

      root      2284  0.0  0.0  22516  1488 ?        Ss   Sep14   0:00 /usr/local/cloudmonitor/bin/argusagent -d
      root      2286  0.2  0.3 939652 14300 ?        Sl   Sep14   3:15 /usr/local/cloudmonitor/bin/argusagent
    1. Download the agent package of the 32-bit version or 64-bit version based on the operating system of the host. Use an administrator account to log on to the host on which you want to install the CloudMonitor agent.

    2. Create the C:\Program Files\Alibaba\cloudmonitor directory. Upload the agent package to the host and decompress the agent package to the C:\Program Files\Alibaba\cloudmonitor directory.

    3. Open the Command Prompt by performing the following operations: Press Win+R. In the Run dialog box, enter cmd and click OK.

    4. Run the following commands to install the CloudMonitor agent:

      1. cd C:\Program Files\Alibaba\cloudmonitor\bin

      2. argusagent_service.exe install

    5. Run the net start argusagent command to start the CloudMonitor agent.

    6. View the status of the CloudMonitor agent.

      1. Open the Services window by performing the following operations: Press Win+R. In the Run dialog box, enter services.msc and click OK.

      2. View the status of the argusagent service. If the status of the argusagent service is Running, the CloudMonitor agent is running properly.

    Third-party host

    Accessible over the Internet

    1. In the Installation Command section, click the image.png icon next to the command to copy the command.image

    2. Log on to the host on which you want to install the CloudMonitor agent as the root user.

    3. Paste and run the command to install the CloudMonitor agent.

    4. Run the following command to view the status of the CloudMonitor agent:

      ps aux | grep argusagent | grep -v grep

      The following output indicates that the CloudMonitor agent is running properly:

      root      2284  0.0  0.0  22516  1488 ?        Ss   Sep14   0:00 /usr/local/cloudmonitor/bin/argusagent -d
      root      2286  0.2  0.3 939652 14300 ?        Sl   Sep14   3:15 /usr/local/cloudmonitor/bin/argusagent

    Inaccessible over the Internet

    Note

    If the CloudMonitor agent is installed on the host but the host is inaccessible over the Internet, the metric data cannot be reported to CloudMonitor. You must configure a proxy server in the CloudMonitor agent. For more information, see Substep 2 in Step 2: Install and configure the CloudMonitor agent.

    1. Install a proxy server. An NGINX proxy server is used in this example. For more information, see Substep 1 to Substep 4 in Step 1: Deploy an NGINX proxy server.

    2. In the Installation Command section, click the image.png icon next to the command to copy the command.image

    3. Log on to the host on which you want to install the CloudMonitor agent as the root user.

    4. Paste and run the command to install the CloudMonitor agent. Replace the parameters in the following command with the actual values. Keep the default values of other parameters.

      CMS_HTTP_PROXY=<Address of the proxy server:Port number>
    5. Run the following command to view the status of the CloudMonitor agent:

      ps aux | grep argusagent | grep -v grep

      The following output indicates that the CloudMonitor agent is running properly:

      root      2284  0.0  0.0  22516  1488 ?        Ss   Sep14   0:00 /usr/local/cloudmonitor/bin/argusagent -d
      root      2286  0.2  0.3 939652 14300 ?        Sl   Sep14   3:15 /usr/local/cloudmonitor/bin/argusagent
    1. Download the agent package of the 32-bit version or 64-bit version based on the operating system of the host. Download the accesskey.properties configuration file.

    2. Use an administrator account to log on to the host on which you want to install the CloudMonitor agent.

    3. Create the C:\Program Files\Alibaba\cloudmonitor directory. Upload the agent package to the host and decompress the agent package to the C:\Program Files\Alibaba\cloudmonitor directory.

    4. Upload the configuration file to the C:\Program Files\Alibaba\cloudmonitor\local_data\conf directory of the host.

    5. Open the Command Prompt by performing the following operations: Press Win+R. In the Run dialog box, enter cmd and click OK.

    6. Run the following commands to install the CloudMonitor agent:

      1. cd C:\Program Files\Alibaba\cloudmonitor\bin

      2. argusagent_service.exe install

    7. Run the net start argusagent command to start the CloudMonitor agent.

    8. View the status of the CloudMonitor agent.

      1. Open the Services window by performing the following operations: Press Win+R. In the Run dialog box, enter services.msc and click OK.

      2. View the status of the argusagent service. If the status of the argusagent service is Running, the CloudMonitor agent is running properly.

Uninstall the CloudMonitor agent

After you uninstall the CloudMonitor agent for C++ from a host, you cannot monitor the host in real time in the CloudMonitor console. However, you can view the historical metric data.

Operating system

Procedure

Windows

  1. Log on to the host where the CloudMonitor agent resides as the administrator.

  2. Open the Command Prompt by performing the following operations: Press Win+R. In the Run dialog box, enter cmd and click OK.

  3. Run the net stop argusagent command to stop the CloudMonitor agent.

  4. Run the "C:\Program Files\Alibaba\cloudmonitor\bin\argusagent_service.exe" uninstall command to uninstall the CloudMonitor agent.

  5. Run the following commands to delete the cloudmonitor directory:

    cd C:\Program Files\Alibaba

    rd /s /q cloudmonitor

Linux

  1. Log on to the host where the CloudMonitor agent resides as a root user.

  2. Run the bash /usr/local/cloudmonitor/cloudmonitorCtl.sh stop command to stop the CloudMonitor agent.

  3. Run the bash /usr/local/cloudmonitor/cloudmonitorCtl.sh uninstall command to uninstall the CloudMonitor agent.

  4. Run the rm -rf /usr/local/cloudmonitor command to delete the cloudmonitor directory.

References

FAQ

API