Skip to main content

Node Agent Configuration

The node agent reads its configuration from environment variables, which you set through nodeAgent.env in your values file.

Some of these have a dedicated chart value and are easier to set that way: nodeAgent.scrapeInterval, nodeAgent.apiKey, nodeAgent.logsEndpoint, nodeAgent.metricsEndpoint, nodeAgent.profilesEndpoint. The chart also passes --cgroupfs-root /host/sys/fs/cgroup as a command-line flag, which wins over CGROUPFS_ROOT, so leave that one alone.


Network and listening​

FlagDescriptionDefault
LISTENAddress the agent listens on (ip:port or :port)0.0.0.0:80
CGROUPFS_ROOTPath to cgroup filesystem mount/sys/fs/cgroup
EPHEMERAL_PORT_RANGESkip tracking these TCP port ranges32768-60999
TRACK_PUBLIC_NETWORKWhitelisted public IP networks to track0.0.0.0/0

Metrics and logs​

FlagDescriptionDefault
DISABLE_LOG_PARSINGDisable container log parsingfalse
DISABLE_L7_TRACINGDisable Layer 7 (application-level) tracingfalse
DISABLE_PINGERDisable upstream pingingtrue
LOG_PER_SECONDMax number of logs processed per second10.0
LOG_BURSTMax log burst capacity (tokens)100
MAX_LABEL_LENGTHMaximum length for any metric label value4096
EXCLUDE_HTTP_REQUESTS_BY_PATHSkip HTTP metrics by path (comma-separated)(none)

Redaction​

FlagDescriptionDefault
SANITIZE_HEADERSEnable header sanitizationtrue
SENSITIVE_HEADERSList of sensitive header names to sanitize (comma-separated)Authorization, Cookie, X-Action-Token
DISABLE_SENSITIVE_LOG_PARSINGStop parsing log lines that look like they carry secretstrue

Cloud labels​

These enrich the node_cloud_info metric:

FlagDescription
PROVIDERCloud provider name
REGIONCloud region
AVAILABILITY_ZONEAvailability zone
ACCOUNT_IDCloud account ID
INSTANCE_TYPEInstance type
INSTANCE_LIFE_CYCLEInstance lifecycle (spot/on-demand)

Endpoints​

FlagDescription
COLLECTOR_ENDPOINTBase endpoint for all telemetry
API_KEYAPI key for the endpoints above. Set it with nodeAgent.apiKey.
METRICS_ENDPOINTSpecific metrics push endpoint
TRACES_ENDPOINTSpecific traces push endpoint
LOGS_ENDPOINTSpecific logs push endpoint
PROFILES_ENDPOINTSpecific profiles push endpoint
INSECURE_SKIP_VERIFYSkip TLS verification (not recommended)

Scraping and storage​

FlagDescriptionDefault
SCRAPE_INTERVALHow often to gather metrics15s
WAL_DIRWhere to store Write-Ahead Logs/tmp/nudgebee-node-agent
MAX_SPOOL_SIZEMaximum size of the on-disk spool buffer500MB

Cardinality and filtering​

FlagDescriptionDefault
CONTAINER_ALLOWLISTList of allowed container regex patterns(none)
CONTAINER_DENYLISTList of denied container regex patterns(none)
AGGREGATE_EPHEMERAL_WORKLOADSAggregate metrics for bare pods and standalone Jobs to reduce series cardinalitytrue
COLLAPSE_INTERNAL_DESTINATIONSUse workload identity instead of raw IP:port for internal destinations to keep series stabletrue
HTTP_PATH_NORMALIZATION_RULESCustom HTTP path normalization rules (pattern1:replacement1,pattern2:replacement2)(none)
RESOLVE_DNSEnable DNS resolution for remote destinationsfalse
IGNORE_CONTROL_PLANEIgnore control plane componentskarpenter,loki,prometheus,grafana,kubelet,etcd,apiserver,victoria,nudgebee-agent,kube-system
ENABLE_DOTNET_TRACINGEnable .NET CLR tracingfalse
DISABLE_GPU_MONITORINGDisable GPU monitoring (NVML)false
TRACE_ID_HEADERSHeaders to extract trace IDsTraceparent,X-Request-Id

Applying configuration​

Here’s an example values.yaml with common flags explicitly set:

Do not change LISTEN

The DaemonSet declares container port 80 and the PodMonitor scrapes the port named http, which is that one. Moving the listener to another port leaves Prometheus scraping a port nothing is bound to, and network metrics go quiet with no error.

nodeAgent:
env:
- name: DISABLE_LOG_PARSING
value: "true"
- name: LOG_PER_SECOND
value: "20"
- name: SANITIZE_HEADERS
value: "true"
- name: SENSITIVE_HEADERS
value: "Authorization,Proxy-Authorization,Cookie,Set-Cookie,X-Auth-Token,X-CSRF-Token,X-Session-ID,X-JWT-Token,X-Api-Key,X-Api-Token,X-Access-Token,X-Secret-Token,X-Refresh-Token,X-User-Token,X-Firebase-Auth,X-Google-Auth,X-Authorization,X-Wsse,X-WebService-Token,Authentication,Proxy-Authentication,X-Authentication-Token,X-Device-ID,X-Device-Token,X-Device-Key"
- name: PROVIDER
value: "aws"
- name: REGION
value: "us-east-1"
- name: ACCOUNT_ID
value: "123456789"
- name: SCRAPE_INTERVAL
value: "30s"

To apply these settings, run:

helm repo add nudgebee-agent https://nudgebee.github.io/k8s-agent/
helm repo update
helm upgrade nudgebee-agent nudgebee-agent/nudgebee-agent \
--namespace nudgebee-agent --reuse-values \
-f values.yaml

If values.yaml holds only these settings, keep --reuse-values: it preserves the auth key and the flags from your original install, which Helm otherwise resets. If you maintain a complete values file that includes runner.nudgebee.auth_secret_key, drop --reuse-values and pass that file instead. nodeAgent.env is a list, so your list replaces the chart's default one — which is why the example restates the chart's full SENSITIVE_HEADERS value. Drop that entry and captured traffic is no longer redacted with the chart's header list.

Troubleshooting Node Agent Failures​

When Agent Health displays Node Agent: 0 or Node Agent: Disconnected, troubleshoot in two layers:

  1. DaemonSet Pod Layer: Are the node agent pods actually scheduled, privileged, and running?
  2. Prometheus Scrape Layer: Is Prometheus scraping them and stamping the expected job label?

Layer 1: DaemonSet Pod Health & Scheduling​

The node agent runs as a privileged DaemonSet on every Linux node. It requires hostPID: true, privileged container capabilities, and host mounts for /sys/fs/cgroup and /sys/kernel/debug.

1. Pod Security Standards (PSA) and OpenShift SCC​

If your cluster enforces the baseline or restricted Pod Security Standard (PSA) on the nudgebee-agent namespace, the Kubernetes Admission Controller will reject the node-agent pods while allowing the unprivileged runner and forwarder to start.

Check DaemonSet events:

kubectl describe daemonset -n nudgebee-agent nudgebee-agent-node-agent

If you see FailedCreate with:

Error creating: pods "..." is forbidden: violates PodSecurity "restricted:latest": privileged, hostPID

Fix: Label the namespace to allow privileged workloads:

kubectl label namespace nudgebee-agent pod-security.kubernetes.io/enforce=privileged --overwrite

On OpenShift, the chart provides an SCC manifest (templates/openshift-scc-privileged.yaml). Note that the node-agent DaemonSet intentionally shares the runner's ServiceAccount (<release-name>-runner-service-account). Ensure this ServiceAccount is granted the privileged SCC:

oc adm policy add-scc-to-user privileged -z nudgebee-agent-runner-service-account -n nudgebee-agent

2. Linux Kernel & eBPF Tracer Compatibility​

The node agent attaches eBPF probes to the host Linux kernel to capture Layer 7 protocol events (HTTP, PostgreSQL, MySQL, Redis, Kafka).

  • Kernel Version: Requires Linux kernel 5.8 or later, or a distribution kernel that backports BPF ring buffers (for example RHEL 8's 4.18). The install script only checks for 4.16, so it won't catch kernels between 4.16 and 5.8.
  • BTF / Kernel Headers: Modern eBPF CO-RE requires BTF support (/sys/kernel/btf/vmlinux) or kernel headers installed on the host.
  • Node OS Nuances: On Google Container-Optimized OS (COS) or AWS Bottlerocket, read-only root filesystems or custom debugfs mount paths can prevent eBPF attachment.

Inspect the node agent container logs for BPF initialization errors:

kubectl logs -n nudgebee-agent daemonset/nudgebee-agent-node-agent -c node-agent --tail=50

Look for:

  • failed to load BPF program or BPF verifier failed
  • cgroupfs root not found (ensure host has /sys/fs/cgroup mounted)
  • permission denied (indicates missing privileged: true or SELinux block)

3. Verify Local Metrics Endpoint​

Confirm whether the node agent daemon is actually collecting metrics and serving its Prometheus exporter on port 80:

NODE_AGENT_POD=$(kubectl get pods -n nudgebee-agent -l app=nudgebee-node-agent -o jsonpath='{.items[0].metadata.name}')
kubectl exec -n nudgebee-agent $NODE_AGENT_POD -c node-agent -- \
wget -qO- http://localhost:80/metrics | grep -E 'node_info|container_net_tcp_successful_connects_total' | head -n 10
  • If metrics are printed: The node agent is functioning perfectly. The issue is entirely in Prometheus target discovery or scraping.
  • If connection refused or command hangs: Check pod logs and ensure no other process is conflicting with container port 80.

Layer 2: Prometheus Discovery & Label Matching​

Agent Health derives its count by querying Prometheus:

up{job=~"(.+/)?nudgebee(-.*)?-node-agent"}

Run this query directly in the Prometheus configured at globalConfig.prometheus_url:

ResultRoot Cause & Resolution
No seriesPrometheus has not discovered the PodMonitor. Check podMonitorSelector and podMonitorNamespaceSelector on the Prometheus CR.
Series exist with job="kubernetes-pods" or job="coroot-node-agent"The pod is scraped under an alternate job name. See Fixing Scrape Job Names.
Series exist with value 0Prometheus cannot reach the pod IP on port 80. Inspect NetworkPolicies or firewall rules blocking Prometheus scrape egress.
Fewer series than cluster nodesSome nodes have no running node-agent pod. The DaemonSet tolerates every taint, so look for pods that are Pending (not enough CPU or memory on the node) or crashing: kubectl get pods -n nudgebee-agent -l app=nudgebee-node-agent -o wide.
Duplicate series per pod with different labelsBoth a static scrape job and PodMonitor are active, scraping the agent twice with conflicting instance labels. Disable nodeAgent.podmonitor.enabled: false.

Matching Prometheus Operator Selectors​

Compare what your Prometheus resource selects against the rendered PodMonitor:

kubectl get prometheus -A -o yaml | grep -A8 -E 'podMonitorSelector:|podMonitorNamespaceSelector:'
kubectl get podmonitor -n nudgebee-agent -o yaml

If podMonitorSelector requires a specific label, add it in values.yaml:

prometheusStack:
selectorLabels:
release: kube-prometheus-stack # Or your Prometheus release name

If your deployment runs offline (GitOps with Argo CD or Flux), ensure enablePrometheusStack: true is set so Helm renders the PodMonitor CR without relying on live cluster capability inspection. See Why is Prometheus Disconnected? for full step-by-step resolution.