If the CloudMonitor agent fails to be automatically installed on an Elastic Compute Service (ECS) instance, follow these steps to identify and resolve the issue.
Prerequisites
Before you begin, ensure that you have:
Access to the affected ECS instance (SSH, VNC, or other method)
Administrator account credentials (the root user on Linux or the Administrator user on Windows)
You can manage the Cloud Monitor agent only by using the root user account (an administrator account). However, using an administrator account may introduce certain risks, such as system stability or data security issues. Proceed with caution.
Step 1: Log on to the ECS instance
Log on to the ECS instance using an administrator account:
Linux: Log on as the
rootuser.Windows: Log on as the
Administratoruser.
Step 2: Check whether the region ID is available
Run the following command to get the region ID from the metadata service:
curl http://100.100.100.200/latest/meta-data/region-idRegion ID returned (for example,
cn-hangzhou): The metadata service is working. Go to Step 3.No output or error: The instance cannot reach the metadata service. Automatic installation is not supported. Manually install the CloudMonitor agent instead.
Step 3: Check OSS network connectivity
The CloudMonitor agent installation package is hosted on Object Storage Service (OSS). Run the following command to test connectivity to the OSS endpoint:
ping cms-agent-${region-id}.oss-${region-id}.aliyuncs.comReplace ${region-id} with the value returned in Step 2. For example, if the region ID is cn-hangzhou:
ping cms-agent-cn-hangzhou.oss-cn-hangzhou.aliyuncs.comPing succeeds: The network is normal. Proceed to Step 4 to check the installation logs for more information. If the issue persists after following Step 4, Submit a ticket to CloudMonitor technical support.
Ping fails or times out: The network is abnormal. The issue may be caused by OSS. Submit a ticket to OSS technical support.
Step 4: View installation logs to identify the cause of failure
If the network connectivity check in Step 3 passes but the CloudMonitor agent still fails to install automatically, log on to the ECS instance and check the installation logs to obtain specific error information.
Linux: Check the CloudMonitor agent installation log files in the
/var/logdirectory.Windows: Check the log files in the CloudMonitor agent installation directory, or view the relevant records in Windows Event Viewer.
If the logs do not clearly indicate the cause, you can try to manually run the installation command to verify the installation. For example, on Linux, run the following command:
ARGUS_VERSION=4.0.0 /bin/bash -c "$(curl -s https://cms-agent-<region-id>.oss-<region-id>-internal.aliyuncs.com/Argus/agent_install-2.0.3.sh)"Replace <region-id> with the actual region ID obtained in Step 2. After the agent is successfully installed, wait a few minutes for the data collection to take effect.
Troubleshooting decision summary
| Step | Check | Result | Action |
|---|---|---|---|
| 1 | Log on as an administrator | -- | Required before running diagnostic commands |
| 2 | Get region ID from metadata service | Success | Go to Step 3 |
| 2 | Get region ID from metadata service | Failure | Manually install the agent |
| 3 | Ping the OSS endpoint | Success | Go to Step 4 |
| 3 | Ping the OSS endpoint | Failure | Submit a ticket to OSS support |
| 4 | Check installation logs | Issue identified | Resolve based on log information |
| 4 | Check installation logs | Issue not identified | Try manual installation, or Submit a ticket to CloudMonitor support |
Windows-specific troubleshooting
If you are using a Windows ECS instance and the CloudMonitor agent fails to install, try the following solutions based on the specific symptom.
Scenario 1: File occupation prevents manual installation
If files in the C drive cannot be deleted or replaced when you attempt to install the agent manually, run the following command in Command Prompt (cmd) to try to start the agent directly:
net start argusagentIf this does not resolve the issue, check whether any process is occupying the relevant files. Alternatively, restart the ECS instance and try the installation again.
Scenario 2: Registry SN cache causes installation failure
If the CloudMonitor agent was previously installed and left residual data in the Windows registry, the serial_number key may prevent reinstallation. To resolve this issue:
Open Registry Editor (run
regedit).Navigate to
HKEY_LOCAL_MACHINE\SOFTWARE\cloudmonitor.Delete the
serial_numberkey.Reinstall the CloudMonitor agent.
Scenario 3: Aliyun Assist Service abnormality prevents automatic installation
When you click to install the CloudMonitor agent in the Alibaba Cloud console, the installation command is delivered through Aliyun Assist Service. If the service is not running normally, or if the Administrator account password for the ECS instance is incorrect, the installation command cannot be delivered and executed. To resolve this issue:
Open Windows Services Manager and verify that Aliyun Assist Service is running normally.
Confirm that the Administrator account password of the ECS instance is correct.