New Relic integrates with Amazon Web Services (AWS) to set up the New Relic infrastructure agent using our EC2 Image Builder component.
This document explains how to configure the integration, and start collecting metrics easily using EC2 Image Builder.
Features
EC2 Image Builder is an AWS service that simplifies management of Amazon Machine Images (AMIs) and container images. This integration includes a component that will automatically install the New Relic infrastructure agent on all new EC2 instances created from the EC2 Image Builder pipeline, saving hours of manual work to set up the agent on each new instance, and giving instantaneous access to monitoring your new instances.
Setup
This integration is available through the AWS Marketplace. You can set up this integration from the marketplace by creating an image recipe using this component.
Prerequisites
To use the component properly, you will need your New Relic license key and AccountId.
Step 1 - Add the New Relic license key to your AWS Secrets Manager
From the AWS Console, navigate to AWS Secrets Manager.
Select Store a new secret.
Select Other type of secret.
Select the Plaintext tab, remove the default text, and paste your New Relic ingest license key.
Configure the secret with a name.
Dica
To match the default settings of the component, you can name these secrets NEW_RELIC_LICENSE_KEY
and NEW_RELIC_ACCOUNT_ID
. If you decide to use a different name, you'll need to include those names in the component in the next step.
- Repeat these steps to create your New Relic AccountId as a secret as well.
Step 2 - Create the EC2 Image Builder recipe
From the AWS Console, navigate to EC2 Image Builder.
From the available options, select Image recipes.
Select the required image specifications.
In the Build components section, select Add build components, and AWS Marketplace components.
Type
new relic
in the search bar, and select the New Relic Infrastructure Agent component.In the component parameters, include the values for the names of your License Key and AccountId as they were created in step 1.
In AWS_Region, specify which region you used to store your AWS Secrets in step 1. Note that the default assumes us-east-1 if no alternative is given.
Configure the rest of the image recipe as desired and save it.
Using the integration
After you have set up the New Relic component using a recipe, that component (and any other configured components) will be applied to that recipe, and can be added to any EC2 Image Builder pipeline. Refer to the Image Builder documentation for a full scope of available uses for EC2 Image Builder and detailed steps for using the service.
After the AMI's have been set up and EC2 instances are created, you can find the data collected through the New Relic infrastructure hosts UI.