Java Agent for a Tomcat JVM

Hi,

I'm trying to pass the jar file with a properties file. As I understood that this was possible.
The properties file is in the same folder and named elasticapm.properties.
How can I pass this file at the startup of my Tomcat.

Br,

Hello,

We use the java agent in version 1.3 and this is what we added to the startup.sh file:

JAVA_OPTS="$JAVA_OPTS -javaagent:/home/tomcat/apm-agent/elastic-apm-agent-1.3.0.jar "
export JAVA_OPTS

Hi and thanks for checking out Elastic APM :slight_smile:

The elasticapm.properties is only for the configuration settings of the agent and does not replace setting the -javaagent argument. See also https://www.elastic.co/guide/en/apm/agent/java/master/configuration.html

You can find tomcat installation instructions here: https://www.elastic.co/guide/en/apm/agent/java/master/setup-javaagent.html#setup-tomcat

Cheers,
Felix

Hi,
Found out how to pass the configuration file. Used -Delastic.apm.configuration=file: in my tomcat options to make it work.
Thx Felix for the information, But just missed the info about the configuration file

This is not an option I'm aware of. Where did you read about that?

You have to put the elasticapm.properties file in the same directory where the agent jar is in.

Tomcat configuration files are modified to start our application.
In order to not screw up things I modified it directy in the registry.
Checked out the other startup option where I found that.
The file was in th same directory since the beginning I tested, it has been picked up since I putted this in the startup options.

Do you have a link at hand?

Sorry Felix, Was talking about the other startup options set in the registry for Tomcat.

I'll try to inform where our R&D found these informations.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.