All Products
Search
Document Center

Application Real-Time Monitoring Service:Automatically install an ARMS agent in an ECS instance

Last Updated:Dec 22, 2023

Application Real-Time Monitoring Service (ARMS) allows you to install an ARMS agent for Java applications deployed in Elastic Compute Service (ECS) instances on graphical user interfaces (GUIs). 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 in ECS instances.

Prerequisites

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 on GUIs. For more information, see Uninstall an ARMS agent.

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

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

  3. In the Backend Applications section of the Integration Center panel, click Java. In the Integrate Java panel, click Automatic installation in ECS environment.

  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 in an ECS instance. The procedures in this topic do not apply to Java applications deployed in containers. If the application is deployed in an ECS instance, run the following commands in the instance 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.

    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 in 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 > Applications. On the Applications 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?