You can install the New Relic eBPF agent on your Linux host to monitor your entire system health. The eBPF agent provides deep visibility into application performance without requiring code changes or deploying language-specific agents.
Install the New Relic eBPF agent
Before you begin
You must meet the prerequisites outlined in the eBPF compatibility and requirements documentation for Linux hosts.
Install the eBPF agent
To install the eBPF agent:
Log in to your New Relic account.
Go to left navigation pane > + Integration & Agents > eBPF Agent.
On the Select an account screen, select the account you want to install the eBPF agent on, and click Continue.
On the Select an installation method page, select On a host, and click Continue.
On the Enter your user key screen, select one of the following options, then click Continue:
- Use an existing key: If you already have a user key, provide the user key. For more information, refer to User keys.
- Create a new key: If you don't have a user key, click Create a new key to create one.
On the Configure the host integration screen, enter the deployment name for host, then click Continue.
On the Install the agent screen, run the provided command in your terminal to install the eBPF agent via Debian package.
Copy and paste the displayed command to install the eBPF agent on your Debian host.
To verify the installation, run the following command:
bash$sudo systemctl status newrelic-ebpf-agent
Upon successful installation, the status of these services display as active (running).
Conseil
You can customize the eBPF agent configuration by editing the
newrelic-ebpf-agent.yamlfile available at/etc/newrelic-ebpf-agent/newrelic-ebpf-agent.yaml. For more information on the configuration parameters, refer to Configuration parameters.Important
On
yum-based hosts, this installation command overwrites/etc/yum.repos.d/newrelic-infra.reposo that it points to a preview yum channel used to fetch thenewrelic-ebpf-agentpackage. This replaces thebaseurlthat the infrastructure agent's own repository file normally uses, and affects RHEL-family hosts (RHEL, CentOS, Rocky Linux, AlmaLinux, and Oracle Linux) as well as Amazon Linux (2, 2022, and 2023).If you also manage the infrastructure agent or on-host integrations (for example
nri-elasticsearch) through this same repository file,yum check-updatemay stop showing new versions for them after installing or upgrading the eBPF agent, because the preview channel carries a smaller, different package set.To restore the standard update path for the infrastructure agent and its integrations, re-run the repository setup command for your OS from Add the infrastructure agent repository (RHEL-family) or Amazon Linux, then refresh the yum cache:
bash$sudo yum clean all$sudo yum -q makecache -y --disablerepo='*' --enablerepo='newrelic-infra'This doesn't affect Debian or Ubuntu hosts, where the eBPF agent is installed from a
.debpackage outside of the infrastructure agent'saptsource list.
Access the eBPF data in New Relic
Once the eBPF agent is installed, it automatically starts collecting data from your Linux host. You can access this data in New Relic's OpenTelemetry UI. For more information on New Relic OpenTelemetry UI, refer OpenTelemetry APM UI.
To view the eBPF data in New Relic:
- Go to one.newrelic.com > APM & Services.
- In the search banner, set the search criteria as
instrumentation.name = nr_ebpf:
Upgrade the eBPF agent
To upgrade the eBPF agent on a Linux host, re-execute the installation command from the New Relic UI. This process will install the new agent version while automatically removing the older one.
Important
Upgrading through a package manager is not supported. You must use the installation command from the New Relic UI for a successful upgrade.
Important
On yum-based hosts (RHEL-family and Amazon Linux), re-running the installation command also overwrites /etc/yum.repos.d/newrelic-infra.repo again. If you rely on that file to keep the infrastructure agent or its on-host integrations updated via yum, repeat the repository restore steps after each eBPF agent upgrade.
To get the latest installation command:
Go to one.newrelic.com > + Integration & Agents > eBPF Agent.
Follow the installation flow to get the updated command.
Run the command on your host to upgrade the agent.
Restart the ebpf agent service using the below command:
bash$sudo systemctl restart newrelic-ebpf-agent
Configuration parameters
The newrelic-ebpf-agent.yaml file contains the following configuration parameters:
Conseil
The eBPF agent automatically generates entity names differently depending on the environment:
In hosts or Docker, these names are a combination of the process name, its directory or container ID, and the listening port. For example,
ruby:/home/ubuntu/app:[5678]orjava:f4aead533895:[8080].In Kubernetes, these names are derived from the service name for example,
mysql-database-service.
Assigning custom name to applications:
- You can assign a custom name to your application by setting the
NEW_RELIC_APP_NAMEenvironment variable for both Kubernetes and on-host applications.
Uninstall the eBPF agent
To uninstall the eBPF agent from a Linux host, use your system's package management tools:
$sudo apt-get purge newrelic-ebpf-agentConseil
It is not necessary to stop the service before running the uninstall command.