Skip to main content
APA
Sponsored by CAST AI — Kubernetes cost optimization Better Stack — Uptime monitoring and log management
⚠️

Alert thresholds depend on the nature of your applications. Some queries may have arbitrary tolerance thresholds. Building an efficient monitoring platform takes time. 😉

eBPF Prometheus Alert Rules

3 Prometheus alerting rules for eBPF. Exported via cloudflare/ebpf_exporter. These rules cover critical and warning conditions — copy and paste the YAML into your Prometheus configuration.

wget https://raw.githubusercontent.com/samber/awesome-prometheus-alerts/refs/heads/master/dist/rules/ebpf/ebpf-exporter.yml
warning

1.11.1. eBPF exporter program not attached

eBPF program {{ $labels.id }} failed to attach. The program is not collecting data. (instance {{ $labels.instance }})

  # The exporter uses loose attachment: if a program fails to load (missing BTF, kernel incompatibility), it sets this metric to 0 and continues running.
- alert: EBPFExporterProgramNotAttached
  expr: ebpf_exporter_ebpf_program_attached == 0
  for: 5m
  labels:
    severity: warning
  annotations:
    summary: eBPF exporter program not attached (instance {{ $labels.instance }})
    description: "eBPF program {{ $labels.id }} failed to attach. The program is not collecting data. (instance {{ $labels.instance }})\n  VALUE = {{ $value }}\n  LABELS = {{ $labels }}"
warning

1.11.2. eBPF exporter decoder errors

eBPF exporter is experiencing decoder errors for config {{ $labels.config }}. Kernel data is not being correctly transformed into labels. (instance {{ $labels.instance }})

- alert: EBPFExporterDecoderErrors
  expr: rate(ebpf_exporter_decoder_errors_total[5m]) > 0.05
  for: 5m
  labels:
    severity: warning
  annotations:
    summary: eBPF exporter decoder errors (instance {{ $labels.instance }})
    description: "eBPF exporter is experiencing decoder errors for config {{ $labels.config }}. Kernel data is not being correctly transformed into labels. (instance {{ $labels.instance }})\n  VALUE = {{ $value }}\n  LABELS = {{ $labels }}"
warning

1.11.3. eBPF exporter no enabled configs

eBPF exporter has no enabled configurations. No eBPF programs are being run. (instance {{ $labels.instance }})

- alert: EBPFExporterNoEnabledConfigs
  expr: ebpf_exporter_enabled_configs == 0 or absent(ebpf_exporter_enabled_configs)
  for: 5m
  labels:
    severity: warning
  annotations:
    summary: eBPF exporter no enabled configs (instance {{ $labels.instance }})
    description: "eBPF exporter has no enabled configurations. No eBPF programs are being run. (instance {{ $labels.instance }})\n  VALUE = {{ $value }}\n  LABELS = {{ $labels }}"