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 title 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.

You can find the most recent version of the agent under your Account settings.
(Select Account Name in Title Bar) > 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 re-start and the application should start appearing in your New Relic account within minutes.

Add the New Relic path to the Container field
Default Environment > Environment Details > Overview > Configuration: Add the New Relic path to the Container field.

For more help

Additional documentation resources include:

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