Install Java agent on JBoss AS 4.2x & above
Note
- Refer to this help page for the previous steps.
- This application server is only compatible with APM Insight Java agent versions below 5.7.0.
- Extract the zip file to a new directory to find agent jar and its configuration files.
- 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.
NoteIf 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.
For JBoss AS 4.x, 5.x, 6.x servers
- For Windows, open <JBOSS_HOME>\bin\run.bat in any text editor and add the following entry at the top and save.
set JAVA_OPTS=-javaagent:<agent_directory_full_path>/apminsight-javaagent.jar %JAVA_OPTS%
- For Linux, open <JBOSS_HOME>/bin/run.sh in any text editor and add the following entry at the top and save.
export JAVA_OPTS="$JAVA_OPTS -javaagent:<agent_directory_full_path>/apminsight-javaagent.jar"
For JBoss AS 7.x servers
- In standalone setup:
Edit <JBOSS_HOME>/bin/standalone.bat(In Linux, standalone.sh) file to add the following java arguments to the existing JAVA_OPTS.
--Djboss.modules.system.pkgs=org.jboss.byteman,com.manageengine -javaagent:<agent_directory_full_path>/apminsight-javaagent.jar
- In domain setup:
Edit <JBOSS_HOME>/domain/configuration/Host.xml file and locate <servers> tag and add the mentioned tags under your desired <server name="your_server" ...> tag.
< system-properties>
<property name="jboss.modules.system.pkgs" value="org.jboss.byteman,com.manageengine" boottime="true"/>
</system-properties>
<jvm name="insight">
<jvm-options>
<option value="-javaagent:<agent_directory_full_path>/apminsight-javaagent.jar" />
</jvm-options>
</jvm> - Save the file and start the JBoss Application Server.
