This topic describes how to install the GoLang agent of CloudMonitor.

System requirements

Operating system Hardware architecture Remarks
Windows 7, Windows Server 2008 R2, or a later version AMD64 or 386 N/A
Linux 2.6.23 or a later version with the glibc library. AMD64 or 386 CentOS 5.x and RHEL 5.x are not supported.
The following resources are required:
  • Installation package size: 10-15 MB.
  • Memory: 10-15 MB. If the shared space is counted, the memory size is 20 MB, which depends on the system memory size.
  • CPU: 1-2%.
  • Network: internal network. No public network bandwidth is used.

Install the agent on Linux

Commonly used commands
# 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

Copy and paste one of the following region-specific commands to the Install shell field on the Monitor Install Guide page in the CloudMonitor console. Then run the command on the server by using root permissions.

  • 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-Beijing Winter Olympics). 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)"
  • China East 1 Finance. Region ID: cn-hangzhou-finance.
    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 East 2 Finance. Region ID: cn-shanghai-finance-1.
    REGION_ID=cn-shanghai-finance-1 VERSION=2.1.55 \
    bash -c "$(curl https://cms-agent-cn-shanghai-finance-1.oss-cn-shanghai-finance-1-pub-internal.aliyuncs.com/cms-go-agent/cms_go_agent_install.sh)"
  • China South 1 Finance. Region ID: cn-shenzhen-finance-1.
    REGION_ID=cn-shenzhen-finance-1 VERSION=2.1.55 \
    bash -c "$(curl http://cms-agent-cn-shenzhen-finance-1.oss-cn-shenzhen-finance-1-internal.aliyuncs.com/cms-go-agent/cms_go_agent_install.sh)"
Note
  • The format of the binary file name of the agent is CmsGoAgent.linux-${ARCH}. The value of the ARCH parameter can be amd64 or 386 depending on the Linux system architecture.
  • We recommend that you use the latest version of the agent. You can find the ID of the latest version on the Host Monitoring page in the CloudMonitor console.

Install the agent on Windows

  1. Select a region and host type. Download a 64-bit agent version or 32-bit agent version depending on your operating system, and save it in the directory C:\Program Files\Alibaba\cloudmonitor.
    Note You can also download the agent over the internet network from the following link: http://cms-agent-cn-qingdao.oss-cn-qingdao-internal.aliyuncs.com/cms-go-agent/2.1.55/CmsGoAgent.windows-amd64.exe. The link can be customized as follows:
    • Replace the cn-qingdao value with the ID of the required region.
    • Replace the amd64 value with 386 to switch to the 32-bit Linux.
    • Change the 2.1.55 value to download the agent of another version.
  2. Open a command prompt window as an administrator.
  3. Run the following commands:
    cd"C:\Program Files\Alibaba\cloudmonitor"
    CmsGoAgent.windows-amd64.exe install
    CmsGoAgent.windows-amd64.exe start
  4. After installation is completed, you can use Windows Services to view, start, and stop the agent.

Uninstall the agent on Windows

  1. Open a command prompt window as an administrator.
  2. Run the following commands:
    cd"C:\Program Files\Alibaba\cloudmonitor"
    CmsGoAgent.windows-amd64.exe stop
    CmsGoAgent.windows-amd64.exe uninstall
  3. Close the command prompt window.
  4. Delete the directory C:\Program Files\Alibaba\cloudmonitor.

Security configuration instructions

The following table lists the ports that the CloudMonitor agent uses to interact with servers. If the ports are disabled by security software, errors may occur when monitoring data is collected. We recommend that you add a corresponding CIDR block to security groups of the ECS instance that require a high level of security.

Note
  • In later versions of CloudMonitor, the existing CIDR blocks may be modified, or new CIDR blocks may be added to the following CIDR blocks. To simplify the configuration of firewall rules, you can allow the outbound traffic to the 100.0.0.0/8 CIDR block. This CIDR block is reserved for the internal network of Alibaba Cloud.
  • The CIDR blocks in square brackets [] are optional. They are used as backup CIDR blocks when the network is instable.
Region CIDR block 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 CloudMonitor.
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 CloudMonitor.
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 CloudMonitor.
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 CloudMonitor.
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 CloudMonitor.
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 CloudMonitor.
China (Zhangjiakou-Beijing Winter Olympics). 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 CloudMonitor.
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 CloudMonitor.
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 CloudMonitor.
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 CloudMonitor.
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 CloudMonitor.
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 CloudMonitor.
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 CloudMonitor.
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 CloudMonitor.
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 CloudMonitor.
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 CloudMonitor.
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 CloudMonitor.
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 CloudMonitor.
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 CloudMonitor.
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 CloudMonitor.

FAQ

Where are logs stored?

  • Linux: /usr/local/cloudmonitor/logs
  • Windows: C:\Program Files\Alibaba\cloudmonitor\logs