Skip to content
Advertisement

How to install new relic on amazon linux

I have have unzipped newrelic files onto amazon linux and have both the installer.sh and config_defaults.sh

I have the license key in the parameter store which I am able to call

I install newrelic with the following command

sudo ./installer.sh GENERATE_CONFIG=true LICENSE_KEY=$APIKEY
sudo systemctl start newrelic-infra # to start the service

Where APPIKEY comes from the parameter store. However when I do sudo systemctl start newrelic-infra

I get error message

level=error msg="can't load configuration file" component="New Relic Infrastructure Agent" error="no license key, please add it to agent's config file or NRIA_LICENSE_KEY environment variable"

How can I make the agent recognize the license key?

Advertisement

Answer

It seems you are installing the infrastructure agent on a Amazon Linux 2 host by following the manual or assisted tarball installation flow. Note that not all features and integrations are available with that setup.

New Relic provides linux packages and a step by step installation in the web interface (see “Add more data” in the New Relic One web).

The standard installation steps for Amazon Linux 2 would be:

echo "license_key: YOUR_LICENSE_KEY" | sudo tee -a /etc/newrelic-infra.yml && 

sudo curl -o /etc/yum.repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/yum/el/7/x86_64/newrelic-infra.repo && 

sudo yum -q makecache -y --disablerepo='*' --enablerepo='newrelic-infra' && 

sudo yum install newrelic-infra -y

Here’s the documentation explaining the different install scenarios.
You can get additional support from the community on the Explorers Hub.

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement