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
The application is deployed in an Alibaba Cloud ECS instance and Cloud Assistant Agent is installed. For more information, see Install Cloud Assistant Agent.
Linux is installed in your ECS instance. ECS instances with other operating systems installed will be filtered out.
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.
NoteYou 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.
The application is deployed on a host. The method in this topic is not applicable to applications deployed in Docker or Kubernetes clusters.
NoteFor information about how to install an ARMS agent for applications deployed in Container Service for Kubernetes (ACK) clusters, see Install an ARMS agent for Java applications deployed in ACK.
For information about how to install an ARMS agent for applications deployed in Kubernetes environments, see Install the ARMS agent for an application deployed in a Kubernetes environment.
The version of the JDK is supported by Application Monitoring. For more information, see Java components and frameworks supported by ARMS.
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.
Log on to the ARMS console. In the left-side navigation pane, choose .
On the Applications page, select a region in the top navigation bar and click Add Application.
In the Backend Applications section of the Integration Center panel, click Java. In the Integrate Java panel, click Automatic installation in ECS environment.
Enter an application name, select the ECS instance where the application resides, and then click Detect Java Processes.
NoteYou can query ECS instances by ECS tag or select ECS instances based on the connected applications.
In the Detect Java Processes step, select the process group of the application.
NoteBy 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.
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.
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
Click Install. In the Install step, view the installation result.
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.
NoteThe 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.
Find the corresponding Java process and obtain the process ID (PID):
ps -ef | grep java
View the process working directory:
ls -al /proc/${pid}/cwd
Click View Application to go to the ARMS application details page.
NoteThe 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
In the left-side navigation pane of the ARMS console, choose . On the Applications page, check whether the Java application is displayed in the application list.
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.