All Products
Search
Document Center

:Automatically install an ARMS agent on ECS instances

Last Updated:Jun 21, 2024

Application Real-Time Monitoring Service (ARMS) allows you to install an ARMS agent for Java applications deployed on Elastic Compute Service (ECS) instances in the ARMS console. The first time that you install an ARMS agent, you need to restart application processes only once without modifying the application startup script. The subsequent upgrade and maintenance of the ARMS agent will also be automatically completed. This topic describes how to install an ARMS agent for a Java application deployed on ECS instances.

Prerequisites

  • Your application is deployed on ECS instances and Cloud Assistant Agent is installed. For more information, see Install Cloud Assistant Agent.

  • Your ECS instances run Linux. ECS instances that run other operating systems are not displayed in the list.

  • Your ECS instances are deployed in virtual private clouds (VPCs). ECS applications in the classic network do not support the installation method described in this topic.

    Note

    You can manually install an ARMS agent for ECS applications in the classic network. For more information, see Manually install an ARMS agent for a Java application.

  • Your application is deployed on a host. The method in this topic is not applicable to applications deployed in Docker or Kubernetes clusters.

    Note
  • The version of the JDK is supported by Application Monitoring. For more information, see Java components and frameworks supported by ARMS.

  • The maximum heap memory of the process is greater than 256 MB.

Install an ARMS agent

If you have manually installed an ARMS agent for your application, you must remove the manually installed configurations from the deployment script and then install an ARMS agent in the ARMS console. For more information, see Uninstall an ARMS agent.

  1. Log on to the ARMS console. In the left-side navigation pane, choose Application Monitoring > Application List.

  2. On the Application List page, select a region in the top navigation bar and click Add Application.

  3. In the Backend Applications section of the Integration Center page, click Java. In the Monitor Java panel, click Automatic Installation on ECS.

  4. Enter an application name, select the ECS instance where the application resides, and then click Detect Java Processes.

    Note

    You can query ECS instances by ECS tag or select ECS instances based on the connected applications.

    安装ECS应用1

  5. In the Detect Java Processes step, select the process group of the application.

    Note
    • By default, the processes that are scanned by ECS are grouped by Process Working Directory. You can select multiple process groups.

    • You can run the ls -al /proc/${pid}/cwd command on ECS instances to view the process working directory.

    If your Java process is not found, check whether the application is deployed on ECS instances. The procedures in this topic do not apply to Java applications deployed in containers. If the application is deployed on ECS instances, run the following commands on the ECS instances and send the screenshot of the returned result to DingTalk account arms160804 for technical support.

    1. View the version of the detector plug-in:

      ls -al /usr/local/share/aliyun-assist/plugin/arms-plugin-detector/

      In this example, the version is 0.4.

    2. Run the detector plug-in in debug mode and view the returned result:

      /usr/local/share/aliyun-assist/plugin/arms-plugin-detector/0.4/bin/detector --logger-level=DEBUG

    安装ECS应用2

  6. Click Install. In the Install step, view the installation result.

    安装ECS应用3

  7. The first time that you integrate the application, the system prompts you to restart the application process. Then, you can install an ARMS agent for the application.

    If Agent installed and monitoring data ready is displayed in the Installation Result column, the ARMS agent is installed.

    Note

    The initial installation requires about 1 minute to complete.

    If Target Java Process Not Found appears after you restart the application process, the process working directory may be changed due to command and script-execution directory changes. You can run the following commands to check whether the commands and script execution directory are changed.

    1. Find the corresponding Java process and obtain the process ID (PID):

      ps -ef | grep java
    2. View the process working directory:

      ls -al /proc/${pid}/cwd

    安装成功

  8. Click View Application to go to the ARMS application details page.

    Note

    The first time that you install an ARMS agent for Java applications deployed on ECS instances, you may need to wait for 1 to 2 minutes. This is because it takes some time to start applications and load monitoring data.

    应用详情

Verify the result

  1. In the left-side navigation pane of the ARMS console, choose Application Monitoring > Application List. On the Application List page, check whether the Java application is displayed in the application list.

  2. Click the name of the application to check whether data is reported on the Application Overview page.

    If data exists, the ARMS agent is installed.

FAQ

How do I view the logs of an ARMS agent?