This topic describes how to automatically install, manually install, and uninstall the CloudMonitor agent for C++.

Automatically install the CloudMonitor agent for C++ (recommended)

This section describes how to automatically install the CloudMonitor agent for C++ on Elastic Compute Service (ECS) instances.

  1. Log on to the CloudMonitor console.
  2. In the left-side navigation pane, click Host Monitoring.
  3. On the Instances tab of the Host Monitoring page, select the ECS instances on which you want to install or update the CloudMonitor agent for C++ and click Batch Install.
    The process requires about 5 minutes to complete. When the agent status changes from Installing to Running, the installation or update succeeds.
    Note If you turn on New Purchase ECS Automatically Installs Cloud Monitor, the CloudMonitor agent for C++ is automatically installed on new ECS instances. Otherwise, you must manually install the CloudMonitor agent for C++.

Manually install the CloudMonitor agent for C++ on ECS instances

Notice If the CloudMonitor agent for C++ fails to be automatically installed or updated on ECS instances, you must uninstall the CloudMonitor agent for C++ before you manually install it. For more information about how to uninstall the CloudMonitor agent for C++, see How do I uninstall the CloudMonitor agent?
  1. Log on to the CloudMonitor console.
  2. In the left-side navigation pane, click Host Monitoring.
  3. On the Instances tab of the Host Monitoring page, click Aliyun ECS install in the upper-right corner.
  4. In the Monitor Install Guide panel, select the region and operating system of the ECS instance on which you want to install the CloudMonitor agent for C++. Then, copy and run the commands that are displayed in the panel as prompted to install the CloudMonitor agent for C++.
    • WindowsECS instance that runs Windows
      1. Download the agent package of the 32-bit version or 64-bit version based on the operating system of the ECS instance.
      2. Use an administrator account to log on to the ECS instance on which you want to install the CloudMonitor agent for C++.
      3. Create the C:\Program Files\Alibaba\cloudmonitor directory.
      4. Upload the agent package to the ECS instance and decompress the agent package to the C:\Program Files\Alibaba\cloudmonitor directory.
      5. Start Command Prompt.

        Press Win+R. In the Run dialog box, enter cmd and click OK.

      6. Run the following commands to install the CloudMonitor agent for C++:

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

        argusagent_service.exe install

      7. Run the following command to start the CloudMonitor agent for C++:

        net start argusagent

      8. View the status of the CloudMonitor agent for C++.
        1. Open the Services window.

          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 Cloud Monitor agent is properly running.

    • LinuxECS instance that runs Linux
      1. In the Monitor Install Guide panel, click Click the copy installation command.
      2. Log on to the ECS instance on which you want to install the CloudMonitor agent for C++ as the root user.
      3. Paste and run the command to install the CloudMonitor agent for C++.
      4. Run the following command to view the status of the Cloud Monitor agent:

        ps aux | grep argusagent | grep -v grep

        The following output indicates that the Cloud Monitor agent is properly running:
        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

Manually install the CloudMonitor agent for C++ on hosts that are not provided by Alibaba Cloud

Notice If you fail to manually install the CloudMonitor agent for C++ on hosts that are not provided by Alibaba Cloud or you want to update the CloudMonitor agent for C++ on the hosts, you must uninstall the CloudMonitor agent for C++ before you manually install it again. For more information about how to uninstall the CloudMonitor agent for C++, see How do I uninstall the CloudMonitor agent?
  1. Log on to the CloudMonitor console.
  2. In the left-side navigation pane, click Host Monitoring.
  3. On the Instances tab of the Host Monitoring page, click Not Aliyun ecs install in the upper-right corner.
  4. In the Monitor Install Guide panel, select the region and operating system of the host on which you want to install the CloudMonitor agent for C++. Then, copy and run the commands that are displayed in the panel as prompted to install the CloudMonitor agent for C++.
    • WindowsHost that runs Windows
      1. Download the agent package of the 32-bit version or 64-bit version based on the operating system of the host.
      2. Download the accesskey.properties configuration file.
      3. Use an administrator account to log on to the host on which you want to install the CloudMonitor agent for C++.
      4. Create the C:\Program Files\Alibaba\cloudmonitor directory.
      5. Upload the agent package to the host and decompress the agent package to the C:\Program Files\Alibaba\cloudmonitor directory.
      6. Upload the configuration file to the C:\Program Files\Alibaba\cloudmonitor\local_data\conf directory of the host.
      7. Open the command prompt window.

        Press Win+R. In the Run dialog box, enter cmd and click OK.

      8. Run the following commands to install the CloudMonitor agent for C++:

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

        argusagent_service.exe install

      9. Run the following command to start the CloudMonitor agent for C++:

        net start argusagent

      10. View the status of the CloudMonitor agent for C++.
        1. Open the Services window.

          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 Cloud Monitor agent is properly running.

    • LinuxHost that runs Linux
      1. In the Monitor Install Guide panel, click Click the copy installation command.
      2. Log on to the host on which you want to install the CloudMonitor agent for C++ as the root user.
      3. Paste and run the command to install the CloudMonitor agent for C++.
      4. Run the following command to view the status of the Cloud Monitor agent:

        ps aux | grep argusagent | grep -v grep

        The following output indicates that the Cloud Monitor agent is properly running:
        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

Uninstall the CloudMonitor agent for C++

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

  • Windows
    1. Log on to the host where the CloudMonitor agent for C++ resides as the administrator.
    2. Open the command prompt window.

      Press Win+R. In the Run dialog box, enter cmd and click OK.

    3. Run the following command to stop the CloudMonitor agent for C++:

      net stop argusagent

    4. Run the following command to uninstall the CloudMonitor agent for C++:

      "C:\Program Files\Alibaba\cloudmonitor\bin\argusagent_service.exe" uninstall

    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 for C++ resides as the root user.
    2. Run the following command to stop the CloudMonitor agent for C++:

      bash /usr/local/cloudmonitor/cloudmonitorCtl.sh stop

    3. Run the following command to uninstall the CloudMonitor agent for C++:

      bash /usr/local/cloudmonitor/cloudmonitorCtl.sh uninstall

    4. Run the following command to delete the cloudmonitor directory:

      rm -rf /usr/local/cloudmonitor