Last Updated: February 25, 2016
·
1.609K
· mashurex

Deploying New Relic on AWS Elastic Beanstalk

It’s relatively straightforward and New Relic’s docs show you how to do it just fine for Tomcat 6.

First, go look over New Relic’s documentation, I’m not going to repeat all the details they show there.

The only difference is the following:
At the Container JVM Command Line Options field, instead of the -javaagent ... string New Relic recommends, put this in instead:

-javaagent:/opt/tomcat7/webapps/ROOT/WEB-INF/lib/newrelic.jar

Where the path to newrelic.jar assumes that you've put your newrelic.jar library in the WAR's WEB-INF/lib directory.

Setting the Logging Environment Name

You can also set the logging environment name in the same line. After the -javaagent ... string you justed enter, put in this:

-Dnewrelic.environment=your_environment_name

If you read through the newrelic.yml file, you can see all the different options that switching environments can give to you besides just a different name in the New Relic dashboard.

http://blog.ashurex.com/2012/08/08/deploying-newrelic-aws-elastic-beanstalk-tomcat/