Install the CloudMonitor agent for Java

更新时间:
复制 MD 格式

This topic describes how to install the CloudMonitor agent for Java.

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

Linux plugin installation instructions

Common commands

# Check the running status
/usr/local/cloudmonitor/wrapper/bin/cloudmonitor.sh status

# Start the agent
/usr/local/cloudmonitor/wrapper/bin/cloudmonitor.sh start

# Stop the agent
/usr/local/cloudmonitor/wrapper/bin/cloudmonitor.sh stop

# Restart the agent
/usr/local/cloudmonitor/wrapper/bin/cloudmonitor.sh restart

# Uninstall the agent
/usr/local/cloudmonitor/wrapper/bin/cloudmonitor.sh remove && \
rm -rf /usr/local/cloudmonitor

Installation commands

Copy one of the following commands and run it on your server with root permissions.

  • China (Qingdao) (cn-qingdao)

    REGION_ID=cn-qingdao VERSION=1.3.7 \
    bash -c "$(curl https://cms-agent-cn-qingdao.oss-cn-qingdao-internal.aliyuncs.com/release/cms_install_for_linux.sh)"
  • China (Beijing) (cn-beijing)

    REGION_ID=cn-beijing VERSION=1.3.7 \
    bash -c "$(curl https://cms-agent-cn-beijing.oss-cn-beijing-internal.aliyuncs.com/release/cms_install_for_linux.sh)"
  • China (Zhangjiakou) (cn-zhangjiakou)

    REGION_ID=cn-zhangjiakou VERSION=1.3.7 \
    bash -c "$(curl https://cms-agent-cn-zhangjiakou.oss-cn-zhangjiakou-internal.aliyuncs.com/release/cms_install_for_linux.sh)"
  • China (Hohhot) (cn-huhehaote)

    REGION_ID=cn-huhehaote VERSION=1.3.7 \
    bash -c "$(curl https://cms-agent-cn-huhehaote.oss-cn-huhehaote-internal.aliyuncs.com/release/cms_install_for_linux.sh)"
  • China (Hangzhou) (cn-hangzhou)

    REGION_ID=cn-hangzhou VERSION=1.3.7 \
    bash -c "$(curl https://cms-agent-cn-hangzhou.oss-cn-hangzhou-internal.aliyuncs.com/release/cms_install_for_linux.sh)"
  • China (Shanghai) (cn-shanghai)

    REGION_ID=cn-shanghai VERSION=1.3.7 \
    bash -c "$(curl https://cms-agent-cn-shanghai.oss-cn-shanghai-internal.aliyuncs.com/release/cms_install_for_linux.sh)"
  • China (Shenzhen) (cn-shenzhen)

    REGION_ID=cn-shenzhen VERSION=1.3.7 \
    bash -c "$(curl https://cms-agent-cn-shenzhen.oss-cn-shenzhen-internal.aliyuncs.com/release/cms_install_for_linux.sh)"
  • China (Hong Kong) (cn-hongkong)

    REGION_ID=cn-hongkong VERSION=1.3.7 \
    bash -c "$(curl https://cms-agent-cn-hongkong.oss-cn-hongkong-internal.aliyuncs.com/release/cms_install_for_linux.sh)"
  • US (Silicon Valley) (us-west-1)

    REGION_ID=us-west-1 VERSION=1.3.7 \
    bash -c "$(curl https://cms-agent-us-west-1.oss-us-west-1-internal.aliyuncs.com/release/cms_install_for_linux.sh)"
  • US (Virginia) (us-east-1)

    REGION_ID=us-east-1 VERSION=1.3.7 \
    bash -c "$(curl https://cms-agent-us-east-1.oss-us-east-1-internal.aliyuncs.com/release/cms_install_for_linux.sh)"
  • Singapore (ap-southeast-1)

    REGION_ID=ap-southeast-1 VERSION=1.3.7 \
    bash -c "$(curl https://cms-agent-ap-southeast-1.oss-ap-southeast-1-internal.aliyuncs.com/release/cms_install_for_linux.sh)"
  • Malaysia (Kuala Lumpur) (ap-southeast-3)

    REGION_ID=ap-southeast-3 VERSION=1.3.7 \
    bash -c "$(curl https://cms-agent-ap-southeast-3.oss-ap-southeast-3-internal.aliyuncs.com/release/cms_install_for_linux.sh)"
  • Indonesia (Jakarta) (ap-southeast-5)

    REGION_ID=ap-southeast-5 VERSION=1.3.7 \
    bash -c "$(curl https://cms-agent-ap-southeast-5.oss-ap-southeast-5-internal.aliyuncs.com/release/cms_install_for_linux.sh)"
  • Japan (Tokyo) (ap-northeast-1)

    REGION_ID=ap-northeast-1 VERSION=1.3.7 \
    bash -c "$(curl https://cms-agent-ap-northeast-1.oss-ap-northeast-1-internal.aliyuncs.com/release/cms_install_for_linux.sh)"
  • Germany (Frankfurt) (eu-central-1)

    REGION_ID=eu-central-1 VERSION=1.3.7 \
    bash -c "$(curl https://cms-agent-eu-central-1.oss-eu-central-1-internal.aliyuncs.com/release/cms_install_for_linux.sh)"
  • UK (London) (eu-west-1)

    REGION_ID=eu-west-1 VERSION=1.3.7 \ bash -c "$(curl https://cms-agent-eu-west-1.oss-eu-west-1-internal.aliyuncs.com/release/cms_install_for_linux.sh)"
  • UAE (Dubai) (me-east-1)

    REGION_ID=me-east-1 VERSION=1.3.7 \
    bash -c "$(curl https://cms-agent-me-east-1.oss-me-east-1-internal.aliyuncs.com/release/cms_install_for_linux.sh)"

Windows plugin installation steps

  1. Download the 64-bit or 32-bit version of the CloudMonitor agent based on your operating system.

  2. Create a folder named cloudmonitor in the C:/Program Files/Alibaba path.

  3. Extract the package to the C:/Program Files/Alibaba/cloudmonitor folder.

  4. Double-click C:/Program Files/Alibaba/cloudmonitor/wrapper/bin/InstallApp-NT.bat with administrative permissions to install the CloudMonitor agent.

  5. Double-click C:/Program Files/Alibaba/cloudmonitor/wrapper/bin/StartApp-NT.bat with administrative permissions to start the CloudMonitor agent.

  6. After the installation is complete, you can view, start, or stop the CloudMonitor Application service from the Windows Services panel.

Steps to uninstall a plugin on Windows

  1. Stop the CloudMonitor service from the Windows Services panel.

  2. Run C:/Program Files/Alibaba/cloudmonitor/wrapper/bin/UninstallApp-NT.bat with administrative permissions to uninstall the CloudMonitor service.

  3. Go to the installation directory and delete the entire C:/Program Files/Alibaba/cloudmonitor folder.

Secure configuration

The CloudMonitor agent uses the following ports to communicate with the server-side. If these ports are blocked by security software, data collection may be disrupted. If your ECS server has strict security requirements, add the following IP addresses to the whitelist to allow outbound traffic.

Note

More IP addresses may be added or changed in future CloudMonitor updates. To simplify firewall rule configuration, you can allow outbound traffic to the 100.100.0.0/16 CIDR block. This CIDR block is reserved for internal Alibaba Cloud services.

Region

IP

Direction

Description

cn-hangzhou (China (Hangzhou))

100.100.19.43:3128

Outbound

Control operations such as configuration management for monitoring.

100.100.45.73:80

Outbound

Collects monitoring data and sends it to the CloudMonitor server-side.

cn-beijing (China (Beijing))

100.100.18.22:3128

Outbound

Control operations such as configuration management for monitoring.

100.100.18.50:80

Outbound

Collects monitoring data and sends it to the CloudMonitor server-side.

cn-qingdao (China (Qingdao))

100.100.36.102:3128

Outbound

Control operations such as configuration management for monitoring.

100.100.15.23:80

Outbound

Collects monitoring data and sends it to the CloudMonitor server-side.

cn-shenzhen (China (Shenzhen))

100.100.0.13:3128

Outbound

Control operations such as configuration management for monitoring.

100.100.0.31:80

Outbound

Collects monitoring data and sends it to the CloudMonitor server-side.

cn-hongkong (China (Hong Kong))

100.103.0.47:3128

Outbound

Control operations such as configuration management for monitoring.

100.103.0.45:80

Outbound

Collects monitoring data and sends it to the CloudMonitor server-side.

cn-huhehaote (China North 5, Hohhot)

100.100.80.135:8080

Outbound

Control operations such as configuration management for monitoring.

100.100.80.12:80

Outbound

Collects monitoring data and sends it to the CloudMonitor server-side.

cn-zhangjiakou: China North 3 (Zhangjiakou)

100.100.80.92:8080

Outbound

Control operations such as configuration management for monitoring.

100.100.0.19:80

Outbound

Collects monitoring data and sends it to the CloudMonitor server-side.

cn-shanghai (China (Shanghai))

100.100.36.11:3128

Outbound

Control operations such as configuration management for monitoring.

100.100.36.6:80

Outbound

Collects monitoring data and sends it to the CloudMonitor server-side.

cn-chengdu (Southwest 1 (Chengdu))

100.100.80.229:8080

Outbound

Control operations such as configuration management for monitoring.

100.100.80.14:80

Outbound

Collects monitoring data and sends it to the CloudMonitor server-side.

us-east-1 (US (Virginia))

100.103.0.95:3128

Outbound

Control operations such as configuration management for monitoring.

100.103.0.94:80

Outbound

Collects monitoring data and sends it to the CloudMonitor server-side.

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

100.103.0.95:3128

Outbound

Control operations such as configuration management for monitoring.

100.100.29.7:80

Outbound

Collects monitoring data and sends it to the CloudMonitor server-side.

eu-central-1 (Germany (Frankfurt))

100.100.80.241:8080

Outbound

Control operations such as configuration management for monitoring.

100.100.80.72:80

Outbound

Collects monitoring data and sends it to the CloudMonitor server-side.

eu-west-1 (UK (London))

100.100.0.3:8080

Outbound

Control operations such as configuration management for monitoring.

100.100.0.2:80

Outbound

Collects monitoring data and sends it to the CloudMonitor server-side.

ap-southeast-1 (Singapore)

100.100.30.20:3128

Outbound

Control operations such as configuration management for monitoring.

100.100.103.7:80

Outbound

Collects monitoring data and sends it to the CloudMonitor server-side.

ap-southeast-3 (Asia-Pacific SE 3 (Kuala Lumpur))

100.100.80.153:8080

Outbound

Control operations such as configuration management for monitoring.

100.100.80.140:80

Outbound

Collects monitoring data and sends it to the CloudMonitor server-side.

ap-southeast-5 (Indonesia (Jakarta))

100.100.80.160:8080

Outbound

Control operations such as configuration management for monitoring.

100.100.80.180:80

Outbound

Collects monitoring data and sends it to the CloudMonitor server-side.

me-east-1 (UAE (Dubai))

100.100.80.142:8080

Outbound

Control operations such as configuration management for monitoring.

100.100.80.151:80

[47.91.99.5:443]

Outbound

Collects monitoring data and sends it to the CloudMonitor server-side.

ap-northeast-1 (Japan (Tokyo))

100.100.80.184:8080

Outbound

Control operations such as configuration management for monitoring.

100.100.80.137:80

[47.91.8.7:443]

Outbound

Collects monitoring data and sends it to the CloudMonitor server-side.

Resource consumption

  • Agent package size: 75 MB.

  • Size after installation: 200 MB.

  • Memory: 64 MB.

  • CPU: Less than 1%.

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

Plugin Log

  • The CloudMonitor agent logs are stored in the following locations:

    • Linux: /usr/local/cloudmonitor/logs

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

  • If a port used by the agent conflicts with another service, modify the port range in the CloudMonitor configuration file at /usr/local/cloudmonitor/wrapper/conf/wrapper.conf and then restart CloudMonitor.

    wrapper.port.min=40000
    wrapper.port.max=41000
    wrapper.jvm.port.min=41001
    wrapper.jvm.port.max=42000