Amazon Web Services (AWS) Elastic Beanstalk is a dynamic service that allows easy deployment and scalability for your applications. Follow these instructions to deploy the infrastructure agent to the instances launched with your AWS Elastic Beanstalk applications.
In addition to deploying the infrastructure agent you can also integrate New Relic with AWS and bring Elastic Beanstalk monitoring information into New Relic. If you haven't already done so, follow these instructions for Amazon integrations with infrastructure monitoring.
Requirements
Make sure you have a supported Amazon Web Services account. In addition, for any New Relic installation, you will need your . This is a 40-character hexadecimal string that New Relic provides when you sign up for your account.
Install the infrastructure agent
To install the infrastructure agent on instances launched with AWS Elastic Beanstalk:
In the
.ebextensions
folder inside your Elastic BeanStalk application, create a new file namednewrelic.config
.Based on the operating system, add the following content to the file:
Replace
YOUR_LICENSE_KEY
with your New Relic .Replace
x86_64
withaarch64
when running on ARM (Graviton).
Push your app to Elastic BeanStalk:
- In general, use
eb deploy
. - If you are still using Eb CLI 2.6 , use
git aws.push
if required. - Optional: Use the AWS Console UI.
- In general, use
After a successful setup, it can take up to fifteen minutes before metrics begin to appear in New Relic. View your host's infrastructure pages at one.newrelic.com.
Configure the infrastructure agent
To configure the infrastructure agent, either adapt the agent configuration file or use environment variables to determine the agent settings based on our requirements. Settings can be applied using any of the methods listed below:
- Settings in file: Edit the
newrelic.config
file in the.ebextensions
folder with additional agent settings. Settings should be included in thenewrelic-infra.yml
file content. - Settings in environment variables: Define the required
NRIA_*
environment variables via Elastic Beanstalk UI, API or CLI. It's also possible to define them viaoption_settings
in thenewrelic.config
file. Learn more from AWS Beanstalk documentation.
Uninstall the infrastructure agent
To uninstall the agent, update the newrelic.config
from .ebextensions
with the following configuration, then update the deployment.