All Products
Search
Document Center

Hands-on tutorial - Create an application monitoring job

Last Updated: Jun 29, 2018

This topic explains how to create an application monitoring job in Tomcat running environment.

  1. Log on to the ARMS Console, and choose Application Monitoring > Application List in the left-side navigation pane. Instance List page is displayed.
  2. In the upper-right corner or the center of the page, click Create Application. Create Application dialog box is displayed.
  3. Enter the application name in the dialog box, and click OK. For example, enter tomcat-demo.

    Application Settings page is displayed.

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

    • Option 1: Download directly. Click Download Probe to download the latest ZIP package.
    • Option 2: Use wget command. Run the wget command to download the Agent compressed package.

      1. wget "http://arms-apm-hangzhou.oss-cn-hangzhou.aliyuncs.com/ArmsAgent.zip" -O ArmsAgent.zip
  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 application settings, find the arms.licenseKey and arms.appId attributes.

    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.

  6. Configuration the environment parameters. Given it’s in the Tomcat running environment, please add the following configuration to setenv.sh under the {TOMCAT_HOME}/bin directory.

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

    Note: If your Tomcat version doesn’t contain the configuration file setenv.sh, open {TOMCAT_HOME}/bin/catalina.sh, find the definition of variable JAVA_OPTS, and append the following configuration to the definition. Click to download a sample: catalina.sh (definition on line 256)

    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"
  7. Start the job. A few minutes later, the agent is automatically connected to ARMS Application Monitoring.

To delete the application, on the Application Settings page, click the Delete tab, and then click Delete Application and confirm.