Monitor Applications with the New Relic Add-on


New Relic application performance management solutions enable developers and operations teams to quickly and cost effectively monitor, troubleshoot, and tune application performance in real time. You can view the health and availability of your production app so you can be sure it's tuned, optimized, and running at its peak. New Relic provides app visibility such as aggregate app response time and throughput.

The New Relic add-on can help you understand if your app or your server needs help by providing real-time application performance. Server utilization info from the app perspective includes CPU utilization; network bandwidth, packets/sec, errors/sec; and server configuration summaries. For more information, see New Relic best practices.

Your New Relic account is created using your Engine Yard account and password.

The New Relic Standard plan is free for Engine Yard accounts. As an incentive, all new accounts start with a free 14-day trial of the New Relic Professional plan. If you select the Professional plan, the New Relic charge appears on your Engine Yard Cloud account bill. You do not get a separate bill from New Relic.

Important: If you previously set up New Relic with the original integration (Account Settings page), you should not attempt to use the new add-on with the same account. For new accounts, use the New Relic add-on, as described below. If you would like to convert from the original integration to the new add-on, contact Engine Yard Support.


Before you set up the New Relic add-on, ensure that you have met the prerequisites:

  • If you have a trial Engine Yard account, you must upgrade to a full account before you can set up an add-on.

  • Consider which applications and environments need New Relic monitoring, and which plan is right for you.

  • You should be ready to deploy your application.

  • You should be ready to upgrade your environment (if it has not been upgraded since November 13th, 2012).

New Relic with Ruby

The New Relic add-on process for your Ruby application requires the following main steps:

New Relic with PHP

The New Relic add-on process for your PHP application only requires one main steps:

Set up the New Relic add-on service

Important: If you previously set up New Relic with the original integration (Account Settings page), you should not attempt to use the new add-on with the same account. If you would like to convert from the original integration to the new add-on, contact Engine Yard Support.

To sign up and activate your apps for New Relic monitoring

  1. Log in to your account.

  2. Navigate to this URL:

  3. Review the add-on details page to learn more about the New Relic service.

    Note: To have New Relic show servers with more descriptive hostnames (including the task the servers perform), submit a request to Support. Ask to have the value descriptive_hostname = "true" set to the metada configuration for the desired environments.

  4. Click the Set it up tab.
  5. Click addons_signup.png to accept the terms and conditions.

    This sets up your New Relic login and password with SSO (providing the same sign-on as Engine Yard Cloud).

  6. On the New Relic Set it up page, select the environment you want to extend with New Relic monitoring.


  7. Click Activate_Button.png to enable the New Relic add-on service for the selected environment.

  8. Navigate to your Environment page and click "Apply" for the changes to take effect.

    FOR PHP APPLICATIONS ONLY: Scroll to the bottom of the Environment page to confirm that New Relic is listed as an add-on.


    For a PHP application, you are done. Your New Relic add-on process is complete. Wait a few minutes for data to start reporting to New Relic.

    Note: If you have multiple apps/environments, then multiple selections appear in the list. Select and click Activate for each app / environment that you want to extend with New Relic.

Deploy the New Relic add-on service

You need to update code before the New Relic add-on service becomes available:

  • Modify your Gemfile.
  • Set up config/newrelic.yml.

Note: If your framework environment is not staging or production, you must add it to newrelic.yml.

Follow the instructions below (from the Set it up page).

To update and deploy your apps for New Relic monitoring

  1. Modify your Gemfile by adding the following lines:

    gem 'ey_config' 
    gem 'newrelic_rpm'
  2. Add the Engine Yard newrelic.yml to your application repository.

    • Download the Engine Yard version of newrelic.yml.

    • Place the newrelic.yml file in the config subdirectory of your application.

  3. Push all changes to your git repository host (e.g., GitHub).

  4. Click on the environment link to go to your application environment in Engine Yard Cloud.


  5. On the environment page, click deploy_button.png to deploy the code changes for the New Relic add-on service.

    This deploys the changes to the Gemfile and to the config/newrelic.yml file.

  6. Click upgrade_button.png to ensure you have the November 13th, 2012 or later Engine Yard stack update, which includes database server monitoring.

    This installs the required New Relic functionality.

Note: If you have multiple apps/environments, then you need to repeat the steps in this section for each environment you are extending with New Relic.

Note: Your New Relic add-on charges (if any) appear on your Engine Yard Cloud account bill. You do not get a separate bill from New Relic.

Verify New Relic configuration

After an environment has been configured and updated with the New Relic add-on, verify the set up.

To verify the New Relic add-on

  1. Log in to your account.

  2. Navigate to this URL:

  3. Click  addons_newrelic_dashboard_link.png 

    The New Relic menu should look something like this:


  4. If you see this:


    ... your app / environment is probably not yet deployed. See the Troubleshooting section below.

View New Relic performance data for your application

You can access your New Relic account directly from Engine Yard Cloud to view monitoring details about your application and its servers.

To view the New Relic add-on data

  1. Log in to your account.

  2. Navigate to this URL:

  3. Click  addons_newrelic_dashboard_link.png 

    This links to the New Relic website where you can review your data.


    Tip: Bookmark this New Relic URL.

  4. To view your application metrics, click the Applications link.

    Note: An "application" in New Relic terms is equivalent to an environment in Engine Yard Cloud.

  5. To view your server metrics, click the Servers link.

    New Relic server metrics are available for single server, app, app master, database, and utility servers.

Use New Relic deploy notifications

New Relic can help you keep track of your application deploys.

To track application deploys

  1. Add the following deploy hook to your application:

    # deploy/after_restart.rb
    run "cd #{config.release_path} && bundle exec rake RAILS_ENV=#{config.environment} APP=#{} DEPLOYED_BY=\"#{config.deployed_by}\" REVISION=#{config.revision.chomp} NR_KEY=#{config.node[:newrelic_key]} newrelic:notify"
  2. Add the following Rake task to your application:

    # lib/tasks/newrelic.rake
    namespace :newrelic do
      task :notify => :environment do
        require 'newrelic_rpm'
        if Rails.env.production? 
          # Notify New Relic of deployment
          puts "Log deployment of #{ENV['REVISION']} with NewRelic"
          app = ""
          key = ""
          if ENV['NR_KEY'].blank?
            app = EY::Config.get("base", "app_environment_name")
            key = EY::Config.get("New Relic", 'license_key')
            app = ENV['APP']
            key = ENV['NR_KEY']
            `curl -H "x-license-key:#{key}" -d "deployment[app_name]=#{app}" -d "deployment[revision]=#{ENV['REVISION']}" -d "deployment[user]=#{ENV['DEPLOYED_BY']}"`
          rescue  Exception => e  
            puts "The following error occurred: #{e.message}"
  3. Click Deploy.

Transfer Account Ownership

If you want to transfer your New Relic account to a new owner, you can do so on the New Relic UI.

To transfer your account to a new owner:

  1. Navigate to your New Relic dashboard.
  2. Click Account Settings tab.
  3. Click Add User.
  4. Enter the new user information.
  5. Click Change Owner.


If you encounter problems with your New Relic account, such as no application data being reported, submit a ticket with Engine Yard Support


When I view the New Relic dashboard, it looks like it's not set up yet. The Gemfile was modified and we set up config/newrelic.yml.         You must click Deploy to update the configuration for each environment that you are extending with New Relic.
Server monitoring is not working.             You need a Chef run to install the New Relic daemon that monitors server resources. Click Upgrade on each environment that you are extending with New Relic. (Fixed in July 24, 2012 stack upgrade.)
Server monitoring does not work (/etc/newrelic/nrsysmond.cfg and /data/*/current/config/newrelic.yml have different license keys). We strongly recommend against using the original New Relic integration (Account Settings page) as well as the new add-on, as this issue results. You also will have double billing and the new account will not reflect historical data. If you would like to convert from the original integration to the new add-on, contact Engine Yard Support.

If you are testing:

Running in development mode - this error appears: Error reading newrelic.yml file: Expected to find EY::Config YAML file at one of: ["config/ey_services_config_deploy.yml", "config/ey_services_config_local.yml"] (RuntimeError)

New Relic doesn't require a valid license key in development mode. The easiest thing to do is create config/ey_services_config_local.yml
'New Relic':
license_key: "NA"
When you deploy, this file remains, however a config/ey_services_config_deploy.yml file is also written; it contains your real license key and takes precedence.
When I put the delayed_job gem into a "group" in the Gemfile, New Relic doesn't display stats for Delayed Job. Add the "group" to the require path for Rails. See The How and Why of Bundler Groups for more information.

If you have feedback or questions about this page, add a comment below. If you need help, submit a ticket with Engine Yard Support.

Was this article helpful?
3 out of 3 found this helpful
Have more questions? Submit a request


  • Avatar
    Ilya Scharrenbroich

    I see that the server is being monitored for my rails application, however, the application is not showing up.  These instructions are very confusing.

  • Avatar
    Keri Meredith

    Hi Ilya, sorry you are having trouble. Please log a Support ticket so we can help you.

    Also, I'd like to understand which parts of the doc you find confusing.

    Thanks for your feedback! kjm

  • Avatar
    Ilya Scharrenbroich

    Thanks, I just filed a ticket. There seems to be missing information on Application monitoring.

  • Avatar
    Pete Brumm listed in the instructions above is not working for me. It keeps redirecting me to

  • Avatar
    Kevin French


    If you are logged into your Cloud account and seeing this issue, please open a ticket and we will be happy to assist. You can also reach out to me in Skype at kevinfrench-ey and I will happily assist. Thanks!

  • Avatar
    Pete Brumm

    Thank you, Kevin. I've opened a ticket.

  • Avatar
    Ches Martin

    The chef cookbook for using an existing New Relic account instead of one locked-in to Engine Yard's add-on system was removed recently:

    Are you no longer supporting this arrangement at all in docs and an unsupported cookbook, or is there a new preferred way to achieve this?

  • Avatar
    Evan Machnic


    New Relic Server Monitoring is now set up by default when the Add-on is activated for an environment, therefore we have deprecated the cookbook in favor of using the Add-on. If customers wish to use a New Relic account outside of our integration then they will need to set things up manually.


    Evan Machnic

  • Avatar
    Ches Martin

    Gotcha, thanks Evan. I've resurrected the removed cookbook in our internal fork of the cookbooks repo so I'll stick with that approach.

  • Avatar
    Sara Trice

    The deploy notification was failing because the app name I was passing was wrong. I had to change my deploy hook to:


    run("cd #{config.release_path} && bundle exec rake RAILS_ENV=#{config.framework_env} APP=\"#{config.environment_name} / #{} (#{config.framework_env})\" DEPLOYED_BY=\"#{config.deployed_by}\" REVISION=#{config.revision.chomp} NR_KEY=#{node[:newrelic_key]} newrelic:notify")


    Not sure if this was just me but figured I'd mention it in case it saves someone else some trouble.

  • Avatar
    Laurent Fallet

    Is there any good reason for not putting the newrelic notification in after_deploy instead of after_restart ?

    As maintenance page is removed after the after_restart phase, moving the newrelic notification in last position should reduce the app downtime. Am I missing something ?

  • Avatar
    Emmet Murphy

    When New Relic Server Monitoring is set up by activating the Add-on for an environment, is there a similarly simple way of installing additional plugins like memcached, MySQL, haproxy, etc? Or do we then need to resort to Chef cookbooks?

  • Avatar
    Ralph Bankston

    Hi Emmet,


    Currently the plugins require manual installation or custom chef to install.

  • Avatar
    Tasha Drew

    Hi Emmet, 

    We also have a bunch of add-ons with partners that do things like memcached as a service, mysql as a service, etc., if that's what you were thinking about.

  • Avatar
    Emmet Murphy

    Thanks and follow up question: Does the chef cookbook have access to EngineYard configuration such as the AWS access and secret keys, similar to the access in the Rails config like the following?

    key = EY::Config.get("New Relic", 'license_key')

  • Avatar
    Jonathan Van Belle

    For the deployment hook I use this :

    new_relic_parameters = " -d 'deployment[app_name]=#{config.environment} / #{}' "

    new_relic_parameters = new_relic_parameters + " -d 'deployment[revision]=#{config.revision}' "

    new_relic_parameters = new_relic_parameters + " -d 'deployment[user]=#{config.deployed_by}' "

    new_relic_parameters = new_relic_parameters + " -d 'deployment[description]=Release #{config.latest_release}' "

    on_app_master do

      run "curl --silent -H 'x-api-key:XXXYOURAUTHKEYXXX' #{new_relic_parameters}"


  • Avatar
    Tyler Bird

    Cool hook Jonathan!  Thanks for sharing.

Powered by Zendesk