AWS Elastic Beanstalk installation for Java

To install New Relic you will need:

Downloading New Relic

To download the latest New Relic agent:

  1. Log in to New Relic.
  2. From the New Relic menu bar, select (account) > Account settings.
  3. Select the option to download the agent for your platform.

As part of the installation process you will use the newrelic.jar and newrelic.yml files.

Account settings agent information
(account) > Account settings: You can find the most recent version of the agent under your Account settings.

Installation

Your newrelic.yml (config) file should work without modification. If you decide to customize your config file, see Java agent configuration.

  1. In your WAR file, add the newrelic.jar and newrelic.yml files to WEB-INF/lib/.
  2. Re-package and deploy your new WAR file, as a new application or an update to a previous application.

Agent activation

Note: These directions are for the Tomcat 6/7 container. You may need to alter the file path for your container.

  1. From the Default Environment page, select Environment Details > Overview.
  2. Select Edit Configuration.
  3. From the Container tab, enter the following into the JVM Command Line Options field:

    For Tomcat 6

    
    -javaagent:/var/lib/tomcat6/webapps/ROOT/WEB-INF/lib/newrelic.jar

    For Tomcat 7

    
    -javaagent:/usr/share/tomcat7/webapps/ROOT/WEB-INF/lib/newrelic.jar
  4. Select Apply Changes.

The JVM will restart and the application should start appearing in your New Relic dashboard within minutes.

Note: Some versions appear to have a parsing issue that reques the backslashes to be escaped:


-javaagent:\/usr\/share\/tomcat7\/webapps\/ROOT\/WEB-INF\/lib\/newrelic.jar
Screen aws default environment.jpg
Default Environment > Environment Details > Overview > Configuration: Add the New Relic path to the Container field.

For more help

Additional documentation resources include:

Join the discussion about Java monitoring in the New Relic Community Forum! The Community Forum is a public platform to discuss and troubleshoot your New Relic toolset.

If you need additional help, get support at support.newrelic.com.