Install the Cloud Monitor agent for Go

更新时间:
复制 MD 格式

This topic describes how to install the Cloud Monitor agent for Go. It covers system requirements, installation instructions, security configurations, and plugin logs.

Important The CloudMonitor agent for Go is no longer maintained. Use the C++ version instead. For more information, see Install and uninstall the CloudMonitor agent.

System requirements

Operating system

Hardware architecture

Notes

Windows 7, Windows Server 2008 R2, and later versions

i386, AMD64

None

Linux 2.6.23 and later versions (Glibc library required)

i386, AMD64

CentOS 5.x and RHEL 5.x are not supported.

Resource consumption is as follows:

  • Plugin package size: 10 MB to 15 MB.

  • Memory: 10 MB to 15 MB, plus about 20 MB of shared space (depending on your system's memory size).

  • CPU: 1% to 2%.

  • Network: Uses the internal network and does not consume Internet traffic.

Linux plugin installation instructions

Common commands

# Register as a system service
/usr/local/cloudmonitor/CmsGoAgent.linux-${ARCH} install
# Remove from system services
/usr/local/cloudmonitor/CmsGoAgent.linux-${ARCH} uninstall
# Start
/usr/local/cloudmonitor/CmsGoAgent.linux-${ARCH} start
# Stop
/usr/local/cloudmonitor/CmsGoAgent.linux-${ARCH} stop
# Restart
/usr/local/cloudmonitor/CmsGoAgent.linux-${ARCH} restart
# Uninstall
/usr/local/cloudmonitor/CmsGoAgent.linux-${ARCH} stop && \
/usr/local/cloudmonitor/CmsGoAgent.linux-${ARCH} uninstall && \
rm -rf /usr/local/cloudmonitor

Installation commands

Copy and run the following command on your server with root permissions.

  • China (Qingdao) [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) (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) (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) (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) (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) (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) (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) (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) (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) (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 (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)"
  • Malaysia (Kuala Lumpur) (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) (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) (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)"
  • Germany (Frankfurt) (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) (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) (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)"
Note
  • The binary file for the Go agent is named in the format CmsGoAgent.linux-${ARCH}. The ARCH variable is either AMD64 or i386, depending on the Linux architecture.

  • Use the latest version of the plugin. You can find the latest version number on the Host Monitoring page in the Cloud Monitor console.

Windows plugin installation steps

  1. Download the 64-bit plugin or 32-bit plugin based on your host type and save it to the C:\Program Files\Alibaba\cloudmonitor folder.

    Note

    You can also download the plugin from an internal network address: http://cms-agent-region (cn-qingdao).oss-region (cn-qingdao)-internal.aliyuncs.com/cms-go-agent/plugin version (2.1.55)/CmsGoAgent.windows-AMD64.exe. The following parameters in the address can be customized:

    • Change the two instances of cn-qingdao to the ID of your target region.

    • Change AMD64 to i386 to download the 32-bit version.

    • Change 2.1.55 to the desired version number.

  2. Start the command prompt with administrative permissions.

  3. Enter and run the following commands.

    cd"C:\Program Files\Alibaba\cloudmonitor"
    CmsGoAgent.windows-amd64.exe install
    CmsGoAgent.windows-amd64.exe start
  4. After the installation is complete, you can view, start, and stop the argusagent service in the Windows Services manager.

Windows plugin uninstallation steps

  1. Start the command prompt with administrative permissions.

  2. Enter and 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.

  4. Delete the C:\Program Files\Alibaba\cloudmonitor folder.

Security configuration instructions

The Cloud Monitor agent uses the following ports to communicate with the server-side. If these ports are disabled by security software, monitoring data collection fails. If your ECS server has high security requirements and you need to allow specific IP addresses, add the following IP addresses to your whitelist.

Note
  • Future updates to Cloud Monitor may add or change IP addresses. To simplify firewall rule configuration, you can allow outbound traffic to the 100.0.0.0/8 CIDR block. This is a reserved internal CIDR block used by Alibaba Cloud to provide official services.

  • The IP addresses in parentheses in the table below are optional. They are used as backup addresses to ensure high availability.

Region

IP

Direction

Description

China (Hangzhou)

100.100.19.43:3128

Outbound

Control operations such as monitoring configuration management

100.100.45.73:80

Outbound

Collects monitoring data and sends it to the Cloud Monitor server-side

cn-beijing (China (Beijing))

100.100.18.22:3128

Outbound

Control operations such as monitoring configuration management

100.100.18.50:80

Outbound

Collects monitoring data and sends it to the Cloud Monitor server-side

cn-qingdao (China (Qingdao))

100.100.36.102:3128

Outbound

Control operations such as monitoring configuration management

100.100.15.23:80

Outbound

Collects monitoring data and sends it to the Cloud Monitor server-side

cn-shenzhen (China (Shenzhen))

100.100.0.13:3128

Outbound

Control operations such as monitoring configuration management

100.100.0.31:80

Outbound

Collects monitoring data and sends it to the Cloud Monitor server-side

cn-hongkong (China (Hong Kong))

100.103.0.47:3128

Outbound

Control operations such as monitoring configuration management

100.103.0.45:80

Outbound

Collects monitoring data and sends it to the Cloud Monitor server-side

cn-huhehaote (China (Hohhot))

100.100.80.135:8080

Outbound

Control operations such as monitoring configuration management

100.100.80.12:80

Outbound

Collects monitoring data and sends it to the Cloud Monitor server-side

cn-zhangjiakou (China (Zhangjiakou))

100.100.80.92:8080

Outbound

Control operations such as monitoring configuration management

100.100.0.19:80

Outbound

Collects monitoring data and sends it to the Cloud Monitor server-side

cn-shanghai (China (Shanghai))

100.100.36.11:3128

Outbound

Control operations such as monitoring configuration management

100.100.36.6:80

Outbound

Collects monitoring data and sends it to the Cloud Monitor server-side

cn-chengdu (Chengdu, China)

100.100.80.229:8080

Outbound

Control operations such as monitoring configuration management

100.100.80.14:80

Outbound

Collects monitoring data and sends it to the Cloud Monitor server-side

us-east-1 (US (Virginia))

100.103.0.95:3128

Outbound

Control operations such as monitoring configuration management

100.103.0.94:80

Outbound

Collects monitoring data and sends it to the Cloud Monitor server-side

us-west-1 (US (Silicon Valley))

100.103.0.95:3128

Outbound

Control operations such as monitoring configuration management

100.100.29.7:80

Outbound

Collects monitoring data and sends it to the Cloud Monitor server-side

eu-central-1 (Germany (Frankfurt))

100.100.80.241:8080

Outbound

Control operations such as monitoring configuration management

100.100.80.72:80

Outbound

Collects monitoring data and sends it to the Cloud Monitor server-side

eu-west-1 (UK (London))

100.100.0.3:8080

Outbound

Control operations such as monitoring configuration management

100.100.0.2:80

Outbound

Collects monitoring data and sends it to the Cloud Monitor server-side

ap-southeast-1 (Singapore)

100.100.30.20:3128

Outbound

Control operations such as monitoring configuration management

100.100.103.7:80

Outbound

Collects monitoring data and sends it to the Cloud Monitor server-side

ap-southeast-3 (Malaysia (Kuala Lumpur))

100.100.80.153:8080

Outbound

Control operations such as monitoring configuration management

100.100.80.140:80

Outbound

Collects monitoring data and sends it to the Cloud Monitor server-side

ap-southeast-5 (Indonesia (Jakarta))

100.100.80.160:8080

Outbound

Control operations such as monitoring configuration management

100.100.80.180:80

Outbound

Collects monitoring data and sends it to the Cloud Monitor server-side

me-east-1 (UAE (Dubai))

100.100.80.142:8080

Outbound

Control operations such as monitoring configuration management

100.100.80.151:80

[47.91.99.5:443]

Outbound

Collects monitoring data and sends it to the Cloud Monitor server-side

ap-northeast-1 (Japan (Tokyo))

100.100.80.184:8080

Outbound

Control operations such as monitoring configuration management

100.100.80.137:80

[47.91.8.7:443]

Outbound

Collects monitoring data and sends it to the Cloud Monitor server-side

Plugin logs

The plugin logs are located in the following directories:

  • Linux: /usr/local/cloudmonitor/logs

  • Windows: C:\Program Files\Alibaba\cloudmonitor\logs