Introduction
This tutorial provides a step-by-step guide on installing NewRelic APM on Jboss EAP 7 in standalone mode
Download NewRelic
Download the current new relic APM from the website, or using the next powershell command:
Invoke-WebRequest -Uri https://download.newrelic.com/newrelic/java-agent/newrelic-agent/current/newrelic-java.zip -OutFile newrelic-java.zip
Configuring Jboss
Create a folder named lib in JBOSS_HOME folder, and a new folder named endorsed in the lib folder.
In case you are wondering, the JBOSS_HOME is the folder that has Jboss installed, and the folder with the bin/docs/etc folders.
Next, edit the JBOSS_HOME\bin\standalone.conf.bat and add the next lines after the set "JAVA_OPTS=...
lines, like bellow:
set JBOSS_ENDORSED_DIRS=%JBOSS_HOME%\lib\endorsed
set "JAVA_OPTS=-javaagent:%JBOSS_HOME%/lib/endorsed/newrelic/newrelic.jar %JAVA_OPTS%"
For example see here:
Configuring NewRelic
Copy all files from the newrelic-java.zip in the folder JBOSS_HOME\lib\endorsed .
Edit newrelic.yml and add change the license and other settings that you may need.
Putting all to the test
Now we can start jboss using standalone.bat from JBOSS_HOME\bin folder.
If everything is ok, jboss will load the new relic agent jar and read the configuration and write the newrelic log file (named newrelic_agent.log)
For more informations about and/or errors you should check the newrelic_agent.log file,
If everything is ok, the local logs should look like :
And the Jboss logs should be visible in NewRelic logs tab:
Also, the application should appear in the APM & Services tab:
Documentation and links:
- NewRelic Documentation - https://docs.newrelic.com/install/java/?deployment=appServer&framework=jboss#jboss-standalone-mode
- Jboss EAP Download - https://developers.redhat.com/products/eap/download