Installation of the Java agent on application servers


Most application servers use the JAVA_OPTS environment variable to set JVM settings.

You may also use the administration console provided with your application server. Refer to your application server documentation to see how to properly change JVM settings.

Download the agent

curl -o sqreen.jar

Set JAVA_OPTS environment variable and make sure it is resolved each time the Java server is restarted:

export JAVA_OPTS="${JAVA_OPTS} -javaagent:/path/to/sqreen.jar -Dsqreen.token=<your Sqreen token>"

Then launch application server as usual.

Basic configuration

Instead of using the system property value (-D parameter), you can also use SQREEN_TOKEN environment variable to set up your token:

export SQREEN_TOKEN=mysecrettoken

Sqreen Java agent provides flexible configuration settings. Refer to the Configuration section for more detailed information.

Advanced configuration

You will have to use advanced configuration if you server is using any of the following:

Uninstall Agent

To uninstall Sqreen agent, simply remove the JAVA_OPTS export (or the equivalent for you application server).


Use different Sqreen Applications for different environments

We recommend you to use different Sqreen applications on your different environments: Production, Staging and Development.