Help Docs

Installing Java Agent in Tomcat Server 8.x and above

Note
Refer to this help page for the previous steps.
  1. Extract the zip file to a new directory to find agent jar and its configuration files.
  2. Open the apminsight.conf file in any text editor, enter your license.key (which can be obtained from the Site24x7 APM Insight page), configure the application.name and agent.server.port values as required, and save the file. Refer here to fine-tune the agent settings.
    Note

    If multiple Java applications or instances are running on the same host, configure application-specific properties, such as application.name and agent.server.port, as JVM system properties instead of configuring them in the apminsight.conf file. For more information, refer to this KB article.

  3. Choose the appropriate method based on your OS:
    1. For Windows, you can follow any of the methods:
      • For Tomcat as non-service installation:
        Edit <TOMCAT_HOME>\bin\catalina.bat and add the following entry to the top and save the file.
        set JAVA_OPTS=%JAVA_OPTS% -javaagent:<agent_directory_full_path>/apminsight-javaagent.jar
      • For Tomcat as service installation, navigate to Configure Tomcat > JAVA tab and add the entry in Java Options textbox.
        -javaagent:<agent_directory_full_path>/apminsight-javaagent.jar
        Note
        If you are unable to find the Configure Tomcat app (for the desired Tomcat server) in Windows search, navigate to the Tomcat bin directory and then double-click on the Tomcat<version>w.exe  file.
    2. For Linux, edit <TOMCAT_HOME>/bin/catalina.sh and add the following entry to the top and save the file.
      export JAVA_OPTS="$JAVA_OPTS -javaagent:<agent_directory_full_path>/apminsight-javaagent.jar"
  4. After adding the entry, click Apply.
  5. Start the Tomcat server.

Video

Here's a quick video on how to install a Site24x7 APM Insight Java agent in Tomcat Server (8.x and above) on Linux.

Was this document helpful?

Would you like to help us improve our documents? Tell us what you think we could do better.


We're sorry to hear that you're not satisfied with the document. We'd love to learn what we could do to improve the experience.


Thanks for taking the time to share your feedback. We'll use your feedback to improve our online help resources.

Shortlink has been copied!