Our infrastructure monitoring agent for Linux can be installed using several package managers. You can use our launcher, or follow the instructions in this document to complete a basic installation.
To use infrastructure monitoring and the rest of our observability platform, join the New Relic family! Sign up to create your free account in only a few seconds. Then ingest up to 100GB of data for free each month. Forever.
Install using the launcher
Before installing our infrastructure monitoring agent for Linux, be sure to:
- Review the requirements.
- Have a valid New Relic license key.
To install our infrastructure monitoring agent, click the button for your Linux distribution, then follow the instructions:








To use the links above, you must be logged to your New Relic account.
If you don't have a New Relic account yet, or prefer to follow the procedure manually, see our step-by-step tutorial in the next section.
Step-by-step instructions
- Create the configuration file and add your license key:
echo "license_key: YOUR_LICENSE_KEY" | sudo tee -a /etc/newrelic-infra.yml
- Determine the distribution version number:
Debian
-
cat /etc/os-release
Ubuntu
-
cat /etc/lsb-release
Amazon Linux,
CentOS,
RHEL
-
cat /etc/os-release
SLES
-
cat /etc/os-release | grep VERSION_ID
- Enable New Relic's GPG key.
Debian
-
curl -s https://download.newrelic.com/infrastructure_agent/gpg/newrelic-infra.gpg | sudo apt-key add -
Ubuntu
-
curl -s https://download.newrelic.com/infrastructure_agent/gpg/newrelic-infra.gpg | sudo apt-key add -
Amazon Linux,
CentOS,
RHEL
-
yum automatically installs the GPG key using the value in
gpgkey
. SLES
-
curl https://download.newrelic.com/infrastructure_agent/gpg/newrelic-infra.gpg -s | sudo gpg --import
There's a known issue with the zypper package manager where GPG keys may not be validated as expected. If you get errors such as
Signature verification failed
, see New Relic's Explorers Hub for more information.
- Add the infrastructure monitoring agent repository:
Debian
- Debian 8 ("Jessie")
printf "deb [arch=amd64] https://download.newrelic.com/infrastructure_agent/linux/apt jessie main" | sudo tee -a /etc/apt/sources.list.d/newrelic-infra.list
Debian 9 ("Stretch")printf "deb [arch=amd64] https://download.newrelic.com/infrastructure_agent/linux/apt stretch main" | sudo tee -a /etc/apt/sources.list.d/newrelic-infra.list
Debian 10 ("Buster")printf "deb [arch=amd64] https://download.newrelic.com/infrastructure_agent/linux/apt buster main" | sudo tee -a /etc/apt/sources.list.d/newrelic-infra.list
Ubuntu
- Ubuntu 12 ("Precise")
printf "deb [arch=amd64] https://download.newrelic.com/infrastructure_agent/linux/apt precise main" | sudo tee -a /etc/apt/sources.list.d/newrelic-infra.list
Ubuntu 14 ("Trusty")printf "deb [arch=amd64] https://download.newrelic.com/infrastructure_agent/linux/apt trusty main" | sudo tee -a /etc/apt/sources.list.d/newrelic-infra.list
Ubuntu 16 ("Xenial")printf "deb [arch=amd64] https://download.newrelic.com/infrastructure_agent/linux/apt xenial main" | sudo tee -a /etc/apt/sources.list.d/newrelic-infra.list
Ubuntu 18 ("Bionic")printf "deb [arch=amd64] https://download.newrelic.com/infrastructure_agent/linux/apt bionic main" | sudo tee -a /etc/apt/sources.list.d/newrelic-infra.list
Ubuntu 20 ("Focal")printf "deb [arch=amd64] https://download.newrelic.com/infrastructure_agent/linux/apt focal main" | sudo tee -a /etc/apt/sources.list.d/newrelic-infra.list
Amazon Linux
- Amazon Linux
sudo curl -o /etc/yum.repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/yum/el/6/x86_64/newrelic-infra.repo
Amazon Linux 2sudo curl -o /etc/yum.repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/yum/el/7/x86_64/newrelic-infra.repo
CentOS /
RHEL
- CentOS 5.x, RHEL 5.x
sudo curl -o /etc/yum.repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/yum/el/5/x86_64/newrelic-infra.repo
CentOS 6.x, RHEL 6.xsudo curl -o /etc/yum.repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/yum/el/6/x86_64/newrelic-infra.repo
CentOS 7.x, RHEL 7.xsudo curl -o /etc/yum.repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/yum/el/7/x86_64/newrelic-infra.repo
CentOS 8.x, RHEL 8.xsudo curl -o /etc/yum.repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/yum/el/8/x86_64/newrelic-infra.repo
SLES
- SLES 11.4
sudo curl -o /etc/zypp/repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/zypp/sles/11.4/x86_64/newrelic-infra.repo
SLES 12.1sudo curl -o /etc/zypp/repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/zypp/sles/12.1/x86_64/newrelic-infra.repo
SLES 12.2sudo curl -o /etc/zypp/repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/zypp/sles/12.2/x86_64/newrelic-infra.repo
SLES 12.3sudo curl -o /etc/zypp/repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/zypp/sles/12.3/x86_64/newrelic-infra.repo
SLES 12.4sudo curl -o /etc/zypp/repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/zypp/sles/12.4/x86_64/newrelic-infra.repo
- Refresh the repositories:
Debian
-
sudo apt-get update
Ubuntu
-
sudo apt-get update
Amazon Linux,
CentOS,
RHEL
-
sudo yum -q makecache -y --disablerepo='*' --enablerepo='newrelic-infra'
SLES
-
sudo zypper -n ref -r newrelic-infra
-
Install the
newrelic-infra
package in root (default), privileged user, or unprivileged user mode. For more information on each running mode, see Linux agent running modes.- Root (default)
-
Debian and
Ubuntu:
sudo apt-get install newrelic-infra -y
Amazon Linux,
CentOS,
RHEL:
sudo yum install newrelic-infra -y
SLES:
sudo zypper -n install newrelic-infra
- Privileged user
-
Install the libcap library and set the
NRIA_MODE
environment variable toPRIVILEGED
.Debian and
Ubuntu:
sudo apt-get install libcap2-bin
sudo NRIA_MODE="PRIVILEGED" apt-get install newrelic-infra
Amazon Linux,
CentOS,
RHEL:
sudo yum install libcap
sudo NRIA_MODE="PRIVILEGED" yum install newrelic-infra
SLES:
sudo zypper install libcap-progs
sudo NRIA_MODE="PRIVILEGED" zypper install newrelic-infra
- Unprivileged user
-
Install the libcap library and set the
NRIA_MODE
environment variable toUNPRIVILEGED
.Debian and
Ubuntu:
sudo apt-get install libcap2-bin
sudo NRIA_MODE="UNPRIVILEGED" apt-get install newrelic-infra
Amazon Linux,
CentOS,
RHEL:
sudo yum install libcap
sudo NRIA_MODE="UNPRIVILEGED" yum install newrelic-infra
SLES:
sudo zypper install libcap-progs
sudo NRIA_MODE="UNPRIVILEGED" zypper install newrelic-infra
Once the infrastructure monitoring agent is installed or updated, you can start, stop, or check the agent status.
As of version 1.4.0, the infrastructure monitoring agent package includes the additional newrelic-infra-ctl
binary, which is used to help troubleshoot a running agent. Although this binary is not required to execute the agent, we recommend to add it in your path.
Install using configuration management tools
To install the infrastructure monitoring agent with a configuration management tool, see the documentation for:
Ansible
Chef
Docker (install as container)
Elastic Beanstalk
Puppet
Install for Docker containers on instrumented hosts
See Docker instrumentation for infrastructure monitoring.
Install using Azure extensions
See Azure extensions for infrastructure monitoring.
Install using tarball files
For custom setup scenarios, you can install the infrastructure monitoring agent using our tarball files in assisted or manual modes.
This is especially useful when you need to adapt the default installation settings to your environment, or to install the infrastructure monitoring agent on distributions that lack the newrelic-infra
package in their repositories.
Installing the agent using tarball files is officially supported only for the AWS Graviton 2 processor.
Update the agent
Follow standard procedures to update the infrastructure monitoring agent.
If you are using sudo
to install or update the agent, use the -E
argument to allow bypassing the environment variables, or specify the NRIA_MODE
environment variable just after sudo
.
export NRIA_MODE="SET_MODE_HERE"
OR
sudo -E YOUR_PACKAGE_MANAGER_UPDATE_COMMAND
What's next?
Generate some traffic and wait a few minutes, then view your hosts in the New Relic One UI. If necessary, follow our troubleshooting procedures if no data appears.
The hostname for your server cannot be localhost
. Data will not be reported for servers with that name. Make sure the host name uses a unique name.
The only required configuration option is the license_key
setting, which is created as part of the installation procedures. You may also want to:
- Add custom attributes to annotate your infrastructure data.
- Connect your AWS account if your servers are hosted on Amazon EC2.
- Enable log forwarding.
- Add other New Relic infrastructure integrations to collect data from external services.