All Products
Document Center

Add an application for monitoring

Last Updated: Jan 25, 2019

This topic explains how to add an application for monitoring.


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

  2. In the upper-right corner or the center of the page, click Create Application.

  3. In the displayed dialog box, enter the application name and click OK. The Application Settings page is displayed.

    Application Settings Page

  4. Use one of the following methods to download the Java probe.

    • Option 1: Download directly. - Click Download to download the latest ZIP package.
    • Option 2: Download with wget. Run the wget command to download the Agent compressed package. (Choose the compressed package according to your region.)

      1. # Hangzhou region
      2. wget "" -O
      3. # Shanghai region
      4. wget "" -O
      5. # Qingdao region
      6. wget "" -O
      7. # Beijing region
      8. wget "" -O
      9. # Shenzhen region
      10. wget "" -O
      11. # Singapore region
      12. wget "" -O
      13. # AntCloud environment
      14. wget "" -O
  5. Extract and deploy the probe package.

    1. Switch to the directory of the ArmsAgent probe package, and extract the package to any working directory.
    2. On the Install Probe page of the application settings, find the arms.licenseKey and arms.appId attributes.

      Install Probe Page

    3. In the Java startup parameters, add the -javaagent parameter, point it to arms-bootstrap-1.7.0-SNAPSHOT.jar in the probe package, and append the -Darms.licenseKey=*xxx* and -Darms.appId=*xxx* parameter.


    • The ‘OutOfMemoryError’ is thrown when starting the application after the Agent is loaded

      In this case, please append the heap memory size configuration item to the Java startup parameters to increase the JVM parameter as appropriate.

      Here is what the configuration items look like when the initial heap memory (Xms) is 512 M andthe maximum heap memory (Xmx) is 2 G. Please adjust the values accordingly. For other environments such as Tomcat, please add this parameter to JAVA_OPTS of the configuration file.

      1. -Xms512M
      2. -Xmx2048M

      If OutOfMemoryError: PermGen space error occurs, add the following parameters:

      1. -XX:PermSize=256M
      2. -XX:MaxPermSize=512M

      Please adjust the values according to the situation. Values provided here are only for reference.

    • ECS environment deployment configuration

      In the agent deployment environment, TCP protocol must be enabled for the following ports: 8442, 8443, and 8883. If the agent is deployed in the ECS environment, the three ports must be enabled in the TCP public network inbound direction. The procedure is as follows:

      1. In the left-side navigation pane of the ARMS console, choose Custom Datasource Management > ECS Log. Locate your ECS instance on the ECS page, and click the ECS instance name to go to the ECS console.

      2. In the left-side navigation pane of the ECS console, choose Network and Security > Security Groups. On the security group list page, click Configure Rules.

        Configure Rules for Security Groups

      3. In the typical network environment, configure the public network inbound and outbound directions. In the private network environment, configure the inbound and outbound directions. In the inbound direction, add the TCP protocol permission for the ports 8442, 8443, and 8883. In the outbound direction, all ports are enabled by default.

    • Tomcat running environment configuration

      Add the following configuration to under the {TOMCAT_HOME}/bin directory:

      Note: If your Tomcat version doesn’t contain the configuration file, open {TOMCAT_HOME}/bin/, find the definition of variable JAVA_OPTS, and append the following configuration to the definition.

      Click to download a sample: (definition on line 256)

      1. JAVA_OPTS="$JAVA_OPTS -javaagent:/{user.workspace}/ArmsAgent/arms-bootstrap-1.7.0-SNAPSHOT.jar -Darms.licenseKey=xxx -Darms.appId=xxx"

      Note: In Windows environment, add the following code to {TOMCAT_HOME}/bin/catalina.bat:

      1. set "JAVA_OPTS=%JAVA_OPTS% -javaagent:{user.workspace}\ArmsAgent\arms-bootstrap-1.7.0-SNAPSHOT.jar -Darms.licenseKey=xxx -Darms.appId=xxx"
    • Jetty running environment configuration

      Add the following configuration to the configuration file {JETTY_HOME}/start.ini:

      1. --exec #Remove the pound sign (#) to uncomment
      2. -javaagent:/{user.workspace}/ArmsAgent/arms-bootstrap-1.7.0-SNAPSHOT.jar
      3. -Darms.licenseKey=xxx
      4. -Darms.appId=xxx
    • Spring Boot running environment configuration

      When starting the Spring Boot process, append the -javaagent parameter to the startup command java.

      1. java -javaagent:/{user.workspace}/ArmsAgent/arms-bootstrap-1.7.0-SNAPSHOT.jar -Darms.licenseKey=xxx -Darms.appId=xxx -jar demoApp.jar

      Note: demoApp.jar is the JAR package of the original application, and please replace it with the actual JAR package.

    • Windows running environment configuration

      When starting the Java process in the Windows environment, use backslash as the separator in the Agent loading path.

      1. {CMD}> java -javaagent:{user.workspace}\ArmsAgent\arms-bootstrap-1.7.0-SNAPSHOT.jar -Darms.licenseKey=XXX -Darms.appId=XXX
      2. -jar {user.workspace}\demoApp.jar

      Note: licenseKey and appId are the values on the application settings page. demoApp.jar is the JAR package of the original application. Please replace them with the actual values.

  6. Restart the job. A few minutes later, the agent is automatically connected to ARMS application monitoring.

    Start Application Page

After this task

To remove an application, do the following:

  1. On the Application Settings page, click the Delete tab and then click Delete Application.
  2. In the displayed dialog box, click Delete to confirm.