The Cloud Monitor agent collects monitoring metrics from a host's operating system and sends the data to Cloud Monitor for analysis. You can use visual charts to view the host's status and create alert rules for key metrics to promptly identify and resolve issues. This topic describes how to install, manage, and uninstall the Cloud Monitor agent.
You can only manage the Cloud Monitor agent by using an administrator account (the root user for Linux or the Administrator user for Windows). However, using an administrator account may introduce certain risks, such as system stability or data security issues. Proceed with caution.
Before you begin
Agent version
C++ 3.X is the recommended version.
The Java and Go versions of the agent are no longer maintained. The C++ version uses significantly fewer resources than the Go and Java versions. Therefore, we recommend installing the C++ version of the agent.
-
Billing: Installing the Cloud Monitor agent, viewing host monitoring charts, and creating alert rules for monitoring metrics are free of charge.
-
System requirements
Operating system
Hardware architecture
Windows 7, Windows Server 2008 R2, and later
i386, AMD64
Linux 2.6.23 and later (must include the Glibc library)
i386, AMD64, ARM64
For more information about the supported installation paths, resource consumption, and logs for the C++ agent, see Cloud Monitor agent overview.
Host network requirements
-
The host must be able to access the internet, either directly or through a NAT Gateway or a proxy server.
-
Firewall allowlist configuration
If a firewall or an ECS security group is configured for the host, you must add the Cloud Monitor server addresses and ports to the allowlist.
NoteThird-party hosts use port 443 to report data and perform heartbeat checks over the internet.
Server address
Query method
Server port
Description
Heartbeat service
nslookup cms-cloudmonitor.aliyun.comorping cms-cloudmonitor.aliyun.com8080, 3128, 443
Used for agent heartbeat checks.
Data reporting
VPC:
nslookup metrichub-<regionid>.aliyun.comInternet:
nslookup metrichub-cms-<regionid>.aliyuncs.com80, 443
Used to report monitoring data.
-
<regionid>is the region ID of the Alibaba Cloud host. Run the following command to obtain the region ID:curl http://100.100.100.200/latest/meta-data/region-id. -
Data reporting over the internet is available only in the China (Hangzhou), China (Shanghai), China (Beijing), and China (Shenzhen) regions.
Metadata service
Fixed CIDR block: 100.100.0.0/16
0-65535
Obtains instance information (Alibaba Cloud hosts only).
-
Comparison of installation methods
You can install the agent automatically or manually based on your host type and network environment.
|
Installation method |
Use cases |
Benefits |
|
Automatic installation from the console |
Alibaba Cloud ECS instances and third-party hosts managed by Cloud Assistant. |
Recommended. This simple method supports batch operations and does not require logging on to the host. |
|
Manual installation |
Scenarios where automatic installation is unavailable, unmanaged third-party hosts, internal or offline environments, and deployments that use automation scripts such as Ansible. |
Highly flexible and suitable for all complex environments. |
Automatic installation (Recommended)
This method applies to Alibaba Cloud hosts and Alibaba Cloud-managed instances.
-
Go to the Host Monitoring page.
-
On the Host Monitoring page, select the hosts on which you want to install or upgrade the agent, and then click Batch Install/Upgrade Agent in the lower-left corner. In the dialog box that appears, click OK.
Note-
For newly purchased Alibaba Cloud hosts, you can turn on the Automatically Install CloudMonitor Agent on Newly Purchased ECS Instances switch in the upper-right corner. Once enabled, the Cloud Monitor agent is automatically installed on new ECS hosts. Otherwise, you must install the agent manually.
-
The installation or upgrade takes about 5 minutes. When the Agent Status of a target host changes from Installing to Running, the operation is complete.
-
Manual installation
Install the agent manually if automatic installation fails or if you are installing in a special environment. If an older or corrupted version of the agent is already on the host, you must uninstall it first.
-
Go to the Host Monitoring page.
-
On the Host Monitoring page, click Host & Agent Operations above the host list, and then click Manual Installation from the drop-down menu.
-
In the Manual Installation dialog box, follow the steps below to complete the installation.
Alibaba Cloud hosts
Linux
-
In the Region field, select the region where the Alibaba Cloud host is located.
-
In the Installation Command area, click the
icon next to the command to copy the command. Select Linux or Windows as the operating system to obtain the corresponding installation command in the Installation Command area. -
Log on to the host as the root user.
-
Paste and run the installation command.
-
Run the following command to check the agent status:
ps aux | grep argusagent | grep -v grep
If the output resembles the following, the agent is running correctly.
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
Windows
-
In the Region field, select the region where the Alibaba Cloud host is located.
-
Download the 32-bit or 64-bit agent package based on the host's operating system.
-
Log on to the host as the Administrator user.
-
Create the directory
C:\Program Files\Alibaba\cloudmonitor. Upload the plugin package to the host, and decompress it to the directoryC:\Program Files\Alibaba\cloudmonitor. -
To open Command Prompt, press Win+R to open the Run dialog box, enter
cmd, and click OK. -
Run the following commands to install the Cloud Monitor agent:
-
cd C:\Program Files\Alibaba\cloudmonitor\bin -
argusagent_service.exe install
-
-
Run the
net start argusagentcommand to start the Cloud Monitor agent. -
Check the agent status.
-
To open the Service window, press Win+R to open the Run dialog box, enter services.msc, and then click OK.
-
Check the status of the argusagent service. If the status is Running, the agent is running correctly.
-
Third-party hosts
Linux
-
In the Region field, select a region to receive monitoring data.
-
In the Manual Installation dialog box, configure the required parameters to generate the installation command. In the Installation Command area, click the copy icon
to copy the command. -
Log on to the host as the root user.
-
Paste and run the installation command.
-
Run the following command to check the agent status:
ps aux | grep argusagent | grep -v grep
If the output resembles the following, the agent is running correctly.
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
Windows
-
In the Region field, select a region to receive monitoring data.
-
Download the agent package (32-bit or 64-bit, depending on the host's operating system) and the
accesskey.propertiesconfiguration file. -
Log on to the host as the Administrator user.
-
Create the directory
C:\Program Files\Alibaba\cloudmonitor. Upload the plugin package to the host, and extract it to the directoryC:\Program Files\Alibaba\cloudmonitor. -
Upload the configuration file to the host and place it in the
C:\Program Files\Alibaba\cloudmonitor\local_data\confdirectory. -
Run the following commands to install the Cloud Monitor agent:
-
cd C:\Program Files\Alibaba\cloudmonitor\bin -
argusagent_service.exe install
-
-
Run the
net start argusagentcommand to start the Cloud Monitor agent. -
Check the agent status.
-
To open the Service window, press Win+R to open the Run dialog box, enter services.msc, and then click OK.
-
Check the status of the argusagent service. If the status is Running, the agent is running correctly.
-
Common issue
If a third-party host with the Cloud Monitor agent installed cannot access the internet, the agent cannot report monitoring data to the Cloud Monitor server. To resolve this, configure a proxy server for the agent by modifying the agent.properties configuration file for the corresponding operating system.
-
Linux path:
/usr/local/cloudmonitor/local_data/conf/agent.properties -
Windows path:
C:\Program Files\Alibaba\cloudmonitor\local_data\conf\agent.properties
For detailed steps on configuring a proxy server, see How do I use an Nginx proxy server to report monitoring data from a third-party host?.
Common operations
Start the agent
-
Linux
Run the following command to start the Cloud Monitor agent:
bash /usr/local/cloudmonitor/cloudmonitorCtl.sh start -
Windows
Run the following command to start the Cloud Monitor agent:
net start argusagent
Check the agent status
-
Linux
Run the following command to check the agent status:
ps aux | grep argusagent | grep -v grepIf the output resembles the following, the agent is running correctly.
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 -
Windows
-
To open the Service window, press Win+R to open the Run dialog box, enter services.msc, and then click OK.
-
Check the status of the argusagent service.
If the status is Running, the agent is running correctly.
-
Stop the agent
-
Linux
Run the following command to stop the Cloud Monitor agent:
bash /usr/local/cloudmonitor/cloudmonitorCtl.sh stop -
Windows
Run the following command to stop the Cloud Monitor agent:
net stop argusagent
Uninstall the agent
After uninstalling the C++ version of the Cloud Monitor agent, you can no longer monitor the host in real time in the Cloud Monitor console, but you can still view its historical monitoring data.
-
Linux
# 1. Stop the Cloud Monitor agent. bash /usr/local/cloudmonitor/cloudmonitorCtl.sh stop # 2. Uninstall the Cloud Monitor agent. bash /usr/local/cloudmonitor/cloudmonitorCtl.sh uninstall # 3. Delete the cloudmonitor directory. rm -rf /usr/local/cloudmonitor -
Windows
# 1. Stop the Cloud Monitor agent. net stop argusagent # 2. Uninstall the Cloud Monitor agent. "C:\Program Files\Alibaba\cloudmonitor\bin\argusagent_service.exe" uninstall # 3. Delete the cloudmonitor directory. cd "C:\Program Files\Alibaba" rd /s /q cloudmonitor