DX Application Performance Management

Expand all | Collapse all

Configuring the Java Agent for Tomcat

Jump to Best Answer
  • 1.  Configuring the Java Agent for Tomcat

    Posted 04-18-2017 06:28 AM

    I followed the instructions but I can not get the agent to start with the service, it could indicate where exactly I should add the options in the catalina.sh file. The tomcat is installed on a Windows server, such as standalone.



  • 2.  Re: Configuring the Java Agent for Tomcat

    Broadcom Employee
    Posted 04-18-2017 06:38 AM

    Assuming Tomcat is running as an actual Windows service, it helps to know the executable the service uses

    It is often Tomcat7w.exe (or a different number for a different version of Tomcat) so check the service configuration for the executable, you would see something like:

     

    C:\Program Files\Apache Software Foundation\Tomcat 7.0\bin\Tomcat7.exe" //RS//Tomcat7

     

    If you double-click on the Tomcat7w.exe, it will open up a window and if you click on the Java tab, you can add the Introscope parameters for the agent in the Java Options window.

    There is more information below on configuring the Windows service, this can be useful where the Tomcat service name is not the default one.

     

    https://tomcat.apache.org/tomcat-7.0-doc/windows-service-howto.html

     

    If a different executable is being used, the Java configuration could be configured elsewhere, like in a wrapper configuration or even Windows registry.



  • 3.  Re: Configuring the Java Agent for Tomcat

    Posted 04-18-2017 06:46 AM

    Hi David, Thank for your answer, but the tomcat is not a service, the client execute it using a script.



  • 4.  Re: Configuring the Java Agent for Tomcat
    Best Answer

    Broadcom Employee
    Posted 04-18-2017 07:11 AM

    Ok, well it depends on the scripts that are used but you can usually just append the information to JAVA_OPTS in catalina.bat like this

     

    set "JAVA_OPTS=%JAVA_OPTS% -javaagent:C:\wily\Agent.jar -DagentProfile=C:\wily\core\config\IntroscopeAgent.profile"

     

    -DagentProfile is correct from agent version 10.3, -Dcom.wily.introscope.agentProfile would be for earlier agents

     

    I use a startup.bat to start Tomcat but I can see it calls catalina.bat, that is where the Java arguments are actually specified.

     

    So a lot depends on customer script, if the script itself configures the Java options or it calls out to something like catalina.bat



  • 5.  Re: Configuring the Java Agent for Tomcat

    Posted 04-18-2017 07:52 AM

    Thank you David, that resulted.