This topic describes how to install the GoLang agent of Cloud Monitor on an Elastic Compute Service (ECS) instance.
System requirements
Operating system | Architecture | Remarks |
---|---|---|
Windows 7, Windows Server 2008 R2, or later | i386 or AMD64 | N/A |
Linux 2.6.23 or later with the GNU C Library | i386 or AMD64 | CentOS 5.x and Red Hat Enterprise Linux 5.x are not supported. |
- Installation package size: 10 to 15 MB.
- Memory usage: 10 to 15 MB. If the shared space is counted, the used memory is about 20 MB. The size of the shared space depends on the system memory size.
- CPU utilization: 1% to 2%.
- Network: internal network. No Internet bandwidth is used.
Install the GoLang agent in Linux
# Register the agent as a system service.
/usr/local/cloudmonitor/CmsGoAgent.linux-${ARCH}install
# Remove the agent from system services.
/usr/local/cloudmonitor/CmsGoAgent.linux-${ARCH} uninstall
# Start the agent.
/usr/local/cloudmonitor/CmsGoAgent.linux-${ARCH} start
# Stop the agent.
/usr/local/cloudmonitor/CmsGoAgent.linux-${ARCH} stop
# Restart the agent.
/usr/local/cloudmonitor/CmsGoAgent.linux-${ARCH} restart
# Uninstall the agent.
/usr/local/cloudmonitor/CmsGoAgent.linux-${ARCH} stop && \
/usr/local/cloudmonitor/CmsGoAgent.linux-${ARCH} uninstall && \
rm -rf /usr/local/cloudmonitor
Installation command
Run the region-specific installation command on the ECS instance as the root user.
- China (Qingdao) (region ID: cn-qingdao)
REGION_ID=cn-qingdao VERSION=2.1.55 \ bash -c "$(curl https://cms-agent-cn-qingdao.oss-cn-qingdao-internal.aliyuncs.com/cms-go-agent/cms_go_agent_install.sh)"
- China (Beijing) (region ID: cn-beijing)
REGION_ID=cn-beijing VERSION=2.1.55 \ bash -c "$(curl https://cms-agent-cn-beijing.oss-cn-beijing-internal.aliyuncs.com/cms-go-agent/cms_go_agent_install.sh)"
- China (Zhangjiakou) (region ID: cn-zhangjiakou)
REGION_ID=cn-zhangjiakou VERSION=2.1.55 \ bash -c "$(curl https://cms-agent-cn-zhangjiakou.oss-cn-zhangjiakou-internal.aliyuncs.com/cms-go-agent/cms_go_agent_install.sh)"
- China (Hohhot) (region ID: cn-huhehaote)
REGION_ID=cn-huhehaote VERSION=2.1.55 \ bash -c "$(curl https://cms-agent-cn-huhehaote.oss-cn-huhehaote-internal.aliyuncs.com/cms-go-agent/cms_go_agent_install.sh)"
- China (Hangzhou) (region ID: cn-hangzhou)
REGION_ID=cn-hangzhou VERSION=2.1.55 \ bash -c "$(curl https://cms-agent-cn-hangzhou.oss-cn-hangzhou-internal.aliyuncs.com/cms-go-agent/cms_go_agent_install.sh)"
- China (Shanghai) (region ID: cn-shanghai)
REGION_ID=cn-shanghai VERSION=2.1.55 \ bash -c "$(curl https://cms-agent-cn-shanghai.oss-cn-shanghai-internal.aliyuncs.com/cms-go-agent/cms_go_agent_install.sh)"
- China (Shenzhen) (region ID: cn-shenzhen)
REGION_ID=cn-shenzhen VERSION=2.1.55 \ bash -c "$(curl https://cms-agent-cn-shenzhen.oss-cn-shenzhen-internal.aliyuncs.com/cms-go-agent/cms_go_agent_install.sh)"
- China (Hong Kong) (region ID: cn-hongkong)
REGION_ID=cn-hongkong VERSION=2.1.55 \ bash -c "$(curl https://cms-agent-cn-hongkong.oss-cn-hongkong-internal.aliyuncs.com/cms-go-agent/cms_go_agent_install.sh)"
- US (Silicon Valley) (region ID: us-west-1)
REGION_ID=us-west-1 VERSION=2.1.55 \ bash -c "$(curl https://cms-agent-us-west-1.oss-us-west-1-internal.aliyuncs.com/cms-go-agent/cms_go_agent_install.sh)"
- US (Virginia) (region ID: us-east-1)
REGION_ID=us-east-1 VERSION=2.1.55 \ bash -c "$(curl https://cms-agent-us-east-1.oss-us-east-1-internal.aliyuncs.com/cms-go-agent/cms_go_agent_install.sh)"
- Singapore (region ID: ap-southeast-1)
REGION_ID=ap-southeast-1 VERSION=2.1.55 \ bash -c "$(curl https://cms-agent-ap-southeast-1.oss-ap-southeast-1-internal.aliyuncs.com/cms-go-agent/cms_go_agent_install.sh)"
- Australia (Sydney) (region ID: ap-southeast-2)
REGION_ID=ap-southeast-2 VERSION=2.1.55 \ bash -c "$(curl https://cms-agent-ap-southeast-2.oss-ap-southeast-2-internal.aliyuncs.com/cms-go-agent/cms_go_agent_install.sh)"
- Malaysia (Kuala Lumpur) (region ID: ap-southeast-3)
REGION_ID=ap-southeast-3 VERSION=2.1.55 \ bash -c "$(curl https://cms-agent-ap-southeast-3.oss-ap-southeast-3-internal.aliyuncs.com/cms-go-agent/cms_go_agent_install.sh)"
- Indonesia (Jakarta) (region ID: ap-southeast-5)
REGION_ID=ap-southeast-5 VERSION=2.1.55 \ bash -c "$(curl https://cms-agent-ap-southeast-5.oss-ap-southeast-5-internal.aliyuncs.com/cms-go-agent/cms_go_agent_install.sh)"
- Japan (Tokyo) (region ID: ap-northeast-1)
REGION_ID=ap-northeast-1 VERSION=2.1.55 \ bash -c "$(curl https://cms-agent-ap-northeast-1.oss-ap-northeast-1-internal.aliyuncs.com/cms-go-agent/cms_go_agent_install.sh)"
- India (Mumbai) (region ID: ap-south-1)
REGION_ID=ap-south-1 VERSION=2.1.55 \ bash -c "$(curl https://cms-agent-ap-south-1.oss-ap-south-1-internal.aliyuncs.com/cms-go-agent/cms_go_agent_install.sh)"
- Germany (Frankfurt) (region ID: eu-central-1)
REGION_ID=eu-central-1 VERSION=2.1.55 \ bash -c "$(curl https://cms-agent-eu-central-1.oss-eu-central-1-internal.aliyuncs.com/cms-go-agent/cms_go_agent_install.sh)"
- UK (London) (region ID: eu-west-1)
REGION_ID=eu-west-1 VERSION=2.1.55 \ bash -c "$(curl https://cms-agent-eu-west-1.oss-eu-west-1-internal.aliyuncs.com/cms-go-agent/cms_go_agent_install.sh)"
- UAE (Dubai) (region ID: me-east-1)
REGION_ID=me-east-1 VERSION=2.1.55 \ bash -c "$(curl https://cms-agent-me-east-1.oss-me-east-1-internal.aliyuncs.com/cms-go-agent/cms_go_agent_install.sh)"
- The binary file of the GoLang agent is named in the following format:
CmsGoAgent.linux-${ARCH}
. The value of the ARCH parameter can be amd64 or i386. This value depends on the Linux system architecture. - We recommend that you use the latest version of the agent. You can find the latest version number on the Host Monitoring page in the Cloud Monitor console.
Install the GoLang agent in Windows
Uninstall the GoLang agent in Windows
Security configuration instructions
The following table lists the IP addresses and ports that the Cloud Monitor agent uses to interact with Cloud Monitor servers. If the ports are disabled by security software, the Cloud Monitor agent fails to report monitoring data to Cloud Monitor. If you use a whitelist to limit the IP addresses that your ECS instance can access, we recommend that you add the IP addresses described in the following table to the whitelist.
- Cloud Monitor may change the IP addresses that it uses to provide services in the future versions. However, all the IP addresses will reside in the 100.0.0.0/8 CIDR block, which is the reserved internal CIDR block that Alibaba Cloud uses to provide services. Therefore, you can allow outbound traffic to the 100.0.0.0/8 CIDR block for your ECS instance. This simplifies the whitelist configuration.
- The IP addresses in brackets [] are optional. They are used as backup IP addresses when the network is unstable.
Region | IP | Direction | Description |
---|---|---|---|
China (Hangzhou) (region ID: cn-hangzhou) | 100.100.19.43:3128 | Outbound | Used for control operations, such as management of monitoring configurations. |
100.100.45.73:80 | Outbound | Used to collect monitoring data to Cloud Monitor. | |
China (Beijing) (region ID: cn-beijing) | 100.100.18.22:3128 | Outbound | Used for control operations, such as management of monitoring configurations. |
100.100.18.50:80 | Outbound | Used to collect monitoring data to Cloud Monitor. | |
China (Qingdao) (region ID: cn-qingdao) | 100.100.36.102:3128 | Outbound | Used for control operations, such as management of monitoring configurations. |
100.100.15.23:80 | Outbound | Used to collect monitoring data to Cloud Monitor. | |
China (Shenzhen) (region ID: cn-shenzhen) | 100.100.0.13:3128 | Outbound | Used for control operations, such as management of monitoring configurations. |
100.100.0.31:80 | Outbound | Used to collect monitoring data to Cloud Monitor. | |
China (Hong Kong) (region ID: cn-hongkong) | 100.103.0.47:3128 | Outbound | Used for control operations, such as management of monitoring configurations. |
100.103.0.45:80 | Outbound | Used to collect monitoring data to Cloud Monitor. | |
China (Hohhot) (region ID: cn-huhehaote) | 100.100.80.135:8080 | Outbound | Used for control operations, such as management of monitoring configurations. |
100.100.80.12:80 | Outbound | Used to collect monitoring data to Cloud Monitor. | |
China (Zhangjiakou) (region ID: cn-zhangjiakou) | 100.100.80.92:8080 | Outbound | Used for control operations, such as management of monitoring configurations. |
100.100.0.19:80 | Outbound | Used to collect monitoring data to Cloud Monitor. | |
China (Shanghai) (region ID: cn-shanghai) | 100.100.36.11:3128 | Outbound | Used for control operations, such as management of monitoring configurations. |
100.100.36.6:80 | Outbound | Used to collect monitoring data to Cloud Monitor. | |
China (Chengdu) (region ID: cn-chengdu) | 100.100.80.229:8080 | Outbound | Used for control operations, such as management of monitoring configurations. |
100.100.80.14:80 | Outbound | Used to collect monitoring data to Cloud Monitor. | |
US (Virginia) (region ID: us-east-1) | 100.103.0.95:3128 | Outbound | Used for control operations, such as management of monitoring configurations. |
100.103.0.94:80 | Outbound | Used to collect monitoring data to Cloud Monitor. | |
US (Silicon Valley) (region ID: us-west-1) | 100.103.0.95:3128 | Outbound | Used for control operations, such as management of monitoring configurations. |
100.100.29.7:80 | Outbound | Used to collect monitoring data to Cloud Monitor. | |
Germany (Frankfurt) (region ID: eu-central-1) | 100.100.80.241:8080 | Outbound | Used for control operations, such as management of monitoring configurations. |
100.100.80.72:80 | Outbound | Used to collect monitoring data to Cloud Monitor. | |
UK (London) (region ID: eu-west-1) | 100.100.0.3:8080 | Outbound | Used for control operations, such as management of monitoring configurations. |
100.100.0.2:80 | Outbound | Used to collect monitoring data to Cloud Monitor. | |
Singapore (region ID: ap-southeast-1) | 100.100.30.20:3128 | Outbound | Used for control operations, such as management of monitoring configurations. |
100.100.103.7:80 | Outbound | Used to collect monitoring data to Cloud Monitor. | |
Australia (Sydney) (region ID: ap-southeast-2) | 100.100.80.92:8080 | Outbound | Used for control operations, such as management of monitoring configurations. |
100.100.80.13:80 [47.91.39.6:443] |
Outbound | Used to collect monitoring data to Cloud Monitor. | |
Malaysia (Kuala Lumpur) (region ID: ap-southeast-3) | 100.100.80.153:8080 | Outbound | Used for control operations, such as management of monitoring configurations. |
100.100.80.140:80 | Outbound | Used to collect monitoring data to Cloud Monitor. | |
Indonesia (Jakarta) (region ID: ap-southeast-5) | 100.100.80.160:8080 | Outbound | Used for control operations, such as management of monitoring configurations. |
100.100.80.180:80 | Outbound | Used to collect monitoring data to Cloud Monitor. | |
UAE (Dubai) (region ID: me-east-1) | 100.100.80.142:8080 | Outbound | Used for control operations, such as management of monitoring configurations. |
100.100.80.151:80 [47.91.99.5:443] |
Outbound | Used to collect monitoring data to Cloud Monitor. | |
Japan (Tokyo) (region ID: ap-northeast-1) | 100.100.80.184:8080 | Outbound | Used for control operations, such as management of monitoring configurations. |
100.100.80.137:80 [47.91.8.7:443] |
Outbound | Used to collect monitoring data to Cloud Monitor. | |
India (Mumbai) (region ID: ap-south-1) | 100.100.80.152:8080 | Outbound | Used for control operations, such as management of monitoring configurations. |
100.100.80.66:80 | Outbound | Used to collect monitoring data to Cloud Monitor. |
Usage notes
The Cloud Monitor agent stores monitoring logs in the following directories:
- Linux: /usr/local/cloudmonitor/logs
- Windows: C:\Program Files\Alibaba\cloudmonitor\logs