nr-ebpf-agent

by Helm

Helm chartv1.8.0App 1.8.0

A Helm chart to monitor a Kubernetes Cluster using the eBPF agent.

About this chart

nr-ebpf-agent

A Helm chart to monitor a Kubernetes Cluster using the eBPF agent.

Helm installation

  1. Download and modify the default configuration file values.yaml. At minimum, you will need populate the licenseKey field with a valid New Relic Ingest key and the cluster field with the name of the cluster to monitor.

NOTE: From chart version 0.2.x onwards, please use the latest values.yaml bundled with each Helm release. This will ensure compatibility with new features and configuration options.

Example:

licenseKey: "EXAMPLEINGESTLICENSEKEY345878592NRALL"
cluster: "name-of-cluster-to-monitor"
  1. Install the helm chart, passing the configuration file created above.
helm repo add newrelic https://helm-charts.newrelic.com
helm upgrade nr-ebpf-agent newrelic/nr-ebpf-agent -f your-custom-values.yaml -n newrelic --create-namespace --install

Version Compatibility

Starting with chart version 1.0.0, version validation is automatically performed to ensure agent compatibility. Chart 1.0.0+ removed OpenTelemetry collector support and requires agent version >= 1.0.0.

Default Behavior: When no custom image tag is specified, the chart uses Chart.AppVersion (1.0.0 for chart 1.0.0), which is guaranteed to be compatible.

ebpfAgent:
  image:
    tag: ""  # Uses Chart.AppVersion (1.0.0)

Custom Image Tag: If you specify a custom image tag, ensure it contains an agent version >= 1.0.0:

ebpfAgent:
  image:
    tag: "1.0.0"  # Or any version >= 1.0.0

Troubleshooting Version Validation

If you encounter version validation errors:

  1. Check your image tag: Ensure ebpfAgent.image.tag is set to a version >= 1.0.0
  2. Use default version: Remove the custom tag to use the chart's default version (recommended)

Source Code

Confirm installation

Watch pods spin up:

kubectl get pods -n newrelic --watch

Check the logs of the eBPF agent pod:

# The agent container logs detail probe attachment and data collection.
kubectl logs <ebpf-pod-name> -c nr-ebpf-agent -n newrelic

Confirm data ingest to New Relic

You should see data reporting into New Relic within a couple of seconds to the Metric and Span tables.

FROM Metric SELECT * WHERE k8s.cluster.name='<CLUSTER_NAME>'

FROM Span SELECT * WHERE k8s.cluster.name='<CLUSTER_NAME>'

The entities view should show OTel services and an "APM-lite" rendition of the data for each entity when clicked on.

Uninstall

Run the following command.

helm uninstall ebpf-agent -n newrelic

Values managed globally

This chart implements the New Relic's common Helm library which means that it honors a wide range of defaults and globals common to most New Relic Helm charts.

Options that can be defined globally include affinity, nodeSelector, tolerations and others. The full list can be found at user's guide of the common library.

Values

KeyTypeDefaultDescription
affinityobject{}Sets all pods' affinities. Can be configured also with global.affinity
allDataFilters.dropApmAgentEnabledEntitybooleanfalseDrop all data for applications or entities that have New Relic or OTEL APM agents running.
allDataFilters.dropNewRelicBundlebooleantrueDrop data from the newrelic namespace and newrelic-bundle services. (RENAMED from dropDataNewRelic for clarity. The old name is deprecated but still supported for backward compatibility).
allDataFilters.dropNamespaceslist["kube-system"]List of Kubernetes namespaces for which all data should be dropped by the agent. (RENAMED from dropDataForNamespaces for clarity. The old name is deprecated but still supported for backward compatibility).
allDataFilters.dropServiceNameRegexstring""Define a regex to match k8s service names to drop. Example "kube-dns|otel-collector|\\bblah\\b". (RENAMED from dropDataServiceNameRegex for clarity. The old name is deprecated but still supported for backward compatibility).
allDataFilters.keepServiceNameRegexstring""This config acts as a bypass for the dropServiceNameRegex config. Service names that match this regex will not have their data dropped by the dropServiceNameRegex. (RENAMED from allowServiceNameRegex for clarity. The old name is deprecated but still supported for backward compatibility).
allDataFilters.dropApmAgentEnabledEntitybooleanfalseDrop all data for applications or entities that have New Relic or OTEL APM agents running.
apmDataFilters.dropEapmForApmEnabledEntitybooleantrueDrop eBPF APM data for applications/entities that have NewRelic APM/OTel agents running.
apmDataFilters.dropPodLabelsobject{}Pod labels to match for filtering APM data. Empty map means no label-based filtering. (Example: dropPodLabels: { "app": "frontend", "env": "production" })
apmDataFilters.dropEntityNamelist[]List of entity names to drop ebpf APM data.
apmDataFilters.keepEntityNamelist[]List of entity names to always keep APM data. By default all entities are kept/enabled. This config bypasses dropEntityName filter.
apmDataFilters.jvmMetricsReportingbooltrueEnable JVM Metrics Reporting.
clusterstring""Name of the Kubernetes cluster to be monitored. Mandatory. Can be configured with global.cluster
customSecretLicenseKeystring""In case you don't want to have the license key in your values, this allows you to point to which secret key is the license key located. Can be configured also with global.customSecretLicenseKey
customSecretNamestring""In case you don't want to have the license key in your values, this allows you to point to a user created secret to get the key from there. Can be configured also with global.customSecretName
logLevelstringINFOTo configure the log level in increasing order of verboseness. OFF, FATAL, ERROR, WARNING, INFO, DEBUG
logFilePathstring""To configure log file path of eBPF Agent. If logging to this path fails, logs will be directed to stdout.
dnsConfigobject{}Sets pod's dnsConfig. Can be configured also with global.dnsConfig
dropAPMEnabledPodsboolfalseDrop data from pods that are monitored by New Relic APM via auto attach.
ebpfAgent.affinityobject{}Sets ebpfAgent pod affinities. Overrides affinity and global.affinity
imagePullSecretslist[]Image pull secrets. Overrides global.images.pullSecrets
ebpfAgent.image.repositorystring"docker.io/newrelic/newrelic-ebpf-agent"eBPF agent image to be deployed.
ebpfAgent.image.tagstring"agent-nr-ebpf-agent_0.0.9"The tag of the eBPF agent image to be deployed.
ebpfAgent.image.pullPolicystring""Image pull policy. Overrides global.images.pullPolicy
ebpfAgent.kernelHeaderInstaller.enabledstring""Force the kernel header installer on (true) or off (false), bypassing agent version detection. Leave empty to auto-detect based on the resolved ebpfAgent.image.tag / Chart.AppVersion (agent versions >= 1.7.0 use CO-RE/BTF and skip header installation automatically).
ebpfAgent.kernelHeaderInstaller.image.pullPolicystring""Image pull policy for kernel header installer. Overrides global.images.pullPolicy
ebpfAgent.podAnnotationsobject{}Sets ebpfAgent pod Annotations. Overrides podAnnotations and global.podAnnotations
ebpfAgent.podSecurityContextobject{}Sets ebpfAgent pod podSecurityContext. Overrides podSecurityContext and global.securityContext.pod
ebpfAgent.resources.limits.memorystring"2Gi"Max memory allocated to the container.
ebpfAgent.resources.requests.cpustring"100m"Min CPU allocated to the container.
ebpfAgent.resources.requests.memorystring"250Mi"Min memory allocated to the container.
ebpfAgent.tolerationslist[]Sets ebpfAgent pod tolerations. Overrides tolerations and global.tolerations
kubernetesClusterDomainstring"cluster.local"Kubernetes cluster domain.
labelsobject{}Additional labels for chart objects.
licenseKeystring""The license key to use. Can be configured with global.licenseKey
reportLogsstringfalseEnable log reporting. When enabled, the agent collects and reports logs from entities. Accepted values: 'true' (always send), 'false' (never send) and 'auto' (send only when APM is not attached)
logDataFilters.applicationLogReporting.enabledstringtrueEnable logs collection from the entities matching the filters below.
logDataFilters.applicationLogReporting.fileRegexstring".*\\.log$"Regex to match log file names to include.
logDataFilters.applicationLogReporting.logLevelThresholdstring"INFOMinimum log level to report (e.g., TRACE, DEBUG, INFO, WARN, ERROR). Default: INFO
logDataFilters.applicationLogReporting.keepFileEntityRegexstring".*"Regex to match entity names to keep logs from log files.
logDataFilters.applicationLogReporting.keepStdEntityRegexstring".*"Regex to match entity names to keep logs from stdout and stderr.
logDataFilters.applicationLogReporting.maxSamplePerMinuteint10000Maximum number of log samples to collect per minute from an entity.
networkMetricsDataFilter.dropPodLabelsobject{}Pod labels to match for filtering Network metrics data. Empty map means no label-based filtering. (Example: dropPodLabels: { "app": "frontend", "env": "production" })
networkMetricsDataFilter.dropEntityNamelist[]List of entity names to drop Network metrics data for
networkMetricsDataFilter.keepEntityNamelist[]List of entity names to always keep Network metrics data. By default all entities are kept/enabled. This config bypasses dropEntityName filter.
networkMetricsReportingstringtrueEnable network metrics reporting. When enabled, the agent collects and reports network metrics including TCP statistics. RENAMED from tcpStatsReporting. The old name is deprecated however backward compatibility is supported.
nodeSelectorobject{}Sets all pods' node selector. Can be configured also with global.nodeSelector
nrStagingboolfalseEndpoint to export data to via the otel collector. NR prod (otlp.nr-data.net:443) by default. Staging (staging-otlp.nr-data.net:443) otherwise.
podLabelsobject{}Additional labels for chart pods.
podSecurityContextobject{}Sets all pods' podSecurityContext. Can be configured also with global.securityContext.pod
priorityClassNamestring""Sets pod's priorityClassName. Can be configured also with global.priorityClassName
protocols.amqp.enabledboolfalse
protocols.amqp.spans.enabledboolfalse
protocols.amqp.spans.samplingLatencystring""
protocols.cass.enabledbooltrue
protocols.cass.spans.enabledboolfalse
protocols.cass.spans.samplingLatencystring""
protocols.dns.enabledboolfalse
protocols.dns.spans.enabledboolfalse
protocols.dns.spans.samplingLatencystring""
protocols.http.enabledbooltrue
protocols.http.spans.enabledbooltrue
protocols.http.spans.samplingErrorRatestring""samplingErrorRate represents the error rate threshold for an HTTP route where surpassing it would mean the corresponds spans of the route are exported. Options: 1-100
protocols.http.spans.samplingLatencystring"p50"
protocols.kafka.enabledboolfalse
protocols.kafka.spans.enabledboolfalse
protocols.kafka.spans.samplingLatencystring""
protocols.mongodb.enabledbooltrue
protocols.mongodb.spans.enabledboolfalse
protocols.mongodb.spans.samplingLatencystring""
protocols.mysql.enabledbooltrue
protocols.mysql.spans.enabledboolfalse
protocols.mysql.spans.samplingLatencystring""
protocols.pgsql.enabledbooltrue
protocols.pgsql.spans.enabledboolfalse
protocols.pgsql.spans.samplingLatencystring""
protocols.redis.enabledbooltrue
protocols.redis.spans.enabledboolfalse
protocols.redis.spans.samplingLatencystring""
stirlingSourcesstring"socket_tracer,tcp_stats"The source connectors (and data export scripts) to enable. Note that socket_tracer tracks http, mysql, redis, mongodb, amqp, cassandra, dns, and postgresql while tcp_stats tracks TCP metrics.
tolerationslist[]Sets all pods' tolerations to node taints. Can be configured also with global.tolerations

Common Errors

Exporting

Deploy nr-ebpf-agent with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has nr-ebpf-agent on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartnr-ebpf-agent is pinned at v1.8.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply