This topic shows you how to use Gateway to connect applications on a user network to Application Real-Time Monitoring Service (ARMS) on Alibaba Cloud.

Scenarios

ARMS on Alibaba Cloud cannot directly monitor applications on a user network due to a network connection issue. In this case, you can deploy Gateway on the classic network or a virtual private cloud (VPC) of Alibaba Cloud and use Gateway as a proxy to connect the applications to ARMS.

Deployment principles

  1. ARMS Gateway cluster A deployed in the DMZ exposes the internal endpoint to Apsara Stack and the user network. The ARMS agents deployed in Apsara Stack and WebLogic send the collected monitoring data to the Gateway cluster.
  2. The DMZ is connected to Alibaba Cloud by using a leased line. ARMS Gateway cluster B deployed in a VPC on Alibaba Cloud is connected to ARMS Gateway cluster A by using the leased line and acts as a bridge.
  3. ARMS Gateway cluster B sends the collected monitoring data to the ARMS server on Alibaba Cloud.
  4. ARMS agents installed on Alibaba Cloud, including frontend agents deployed on pages, send data to the ARMS server on Alibaba Cloud.

Requirements on hybrid cloud deployment of ARMS

  • Assume that you need to collect data from 500 nodes in Apsara Stack and the user-network. You must prepare six virtual machines to deploy two Gateway clusters. Each virtual machine is allocated 2 CPU cores and 8 GB memory. Each Gateway cluster contains three virtual machines on which Gateway is deployed.
  • The monitoring data that is sent from Gateway to Alibaba Cloud is small in size and occupies less than 1 Mbit/s bandwidth. You can use the bandwidth of the existing leased line and install ARMS agents in Enterprise Distributed Application Service (EDAS) of Apsara Stack and WebLogic to monitor applications, without the need to modify application code.

Connect an application to ARMS

  1. Download the Gateway package. In this example, Gateway connects to the ARMS service in the China (Hangzhou) region.
  2. Deploy Gateway on a proxy server and run the following command to start Gateway:
    java -jar arms-gateway-1.7.0.jar
    Note The version of Java Development Kit (JDK) must be later than JDK 1.7.
    By default, Gateway connects to the ARMS service in the China (Hangzhou) region. To connect Gateway to the ARMS service in another region, you can specify the region by using the -D parameter. The following sample command is used to connect to the China (Beijing) region:
    java -jar -Darms.server.endpoint=arms-dc-bj.aliyuncs.com arms-gateway-1.7.0.jar
    Region Endpoint
    China (Hangzhou) arms-dc-hz.aliyuncs.com
    China (Shanghai) arms-dc-sh.aliyuncs.com
    China (Qingdao) arms-dc-qd.aliyuncs.com
    China (Beijing) arms-dc-bj.aliyuncs.com
    China (Zhangjiakou) arms-dc-zb.aliyuncs.com
    China (Hohhot) dc-cn-huhehaote.arms.aliyuncs.com
    China (Ulanqab) dc-cn-wulanchabu.arms.aliyuncs.com
    China (Shenzhen) arms-dc-sz.aliyuncs.com
    China (Heyuan) dc-cn-heyuan.arms.aliyuncs.com
    China (Guangzhou) dc-cn-guangzhou.arms.aliyuncs.com
    China (Chengdu) dc-cn-chengdu.arms.aliyuncs.com
    China (Hong Kong) arms-dc-hk.aliyuncs.com
    Singapore (Singapore) arms-dc-sg.aliyuncs.com
    Australia (Sydney) dc-ap-southeast-2.arms.aliyuncs.com
    Malaysia (Kuala Lumpur) dc-ap-southeast-3.arms.aliyuncs.com
    Indonesia (Jakarta) arms-dc-indonesia.aliyuncs.com
    Japan (Tokyo) arms-dc-jp.aliyuncs.com
    Germany (Frankfurt) arms-dc-frankfurt.aliyuncs.com
    UK (London) dc-eu-west-1.arms.aliyuncs.com
    US (Virginia) dc-us-east-1.arms.aliyuncs.com
    US (Silicon Valley) arms-dc-usw.aliyuncs.com
    India (Mumbai) dc-ap-south-1.arms.aliyuncs.com
    China North 2 Ali Gov 1 arms-dc-gov.aliyuncs.com
    China East 1 Finance arms-dc-hz-finance.aliyuncs.com
    China East 2 Finance arms-dc-sh-finance.aliyuncs.com
    China South 1 Finance arms-dc-sz-finance.aliyuncs.com
  3. Download the ARMS agent.

    You can log on to the ARMS console and download the agent on the Access Center page. For more information, see Manually install the ARMS agent for a Java application.

  4. Decompress the agent installation package.
  5. In the arms-agent.config file, change the value of the profiler.collector.ip parameter to the IP address of the proxy server.
    profiler.collector.ip={IP address of the proxy server}
  6. Start the application. In the ARMS console, choose Application Monitoring > Applications in the left-side navigation pane. Check whether monitoring data is reported. If monitoring data is reported, the application is connected to ARMS.