Kernel-Level Filtering (eBPF)
The most efficient filtering happens in the kernel, before events reach userspace.Process Name Filter
Only capture events from specific processes:comm (first 15 characters of executable name).
PID Filter
Monitor specific process IDs:Filter Behavior
- Empty filter = all processes: If no filter is specified, all processes are monitored
- Whitelist mode: Only matching processes are captured
- OR logic: Event is captured if PID matches OR comm matches
Example: Monitor AI Agents
Event Type Filtering
Control which event types are captured:Reducing Noise
File events can be very noisy. Disable if not needed:Path Filtering (eBPF Level)
The eBPF programs automatically filter out common system paths:Userspace Filtering
Additional filtering can happen after capture:Via Redaction
Events matching patterns can be dropped or modified:Via Export
Each export can have its own filters:Dynamic Filtering
Filters can be updated at runtime via the API:Performance Impact
| Filter Level | Performance Impact | Recommended |
|---|---|---|
| eBPF (kernel) | Minimal | Always use for high-volume filtering |
| Userspace | Low | For complex logic |
| Export | Negligible | For per-destination filtering |
Best Practices
- Filter early: Use process_filter/pid_filter for broad filtering
- Disable unused captures: Set
file = falseif not needed - Use specific processes: Monitor only relevant applications
- Avoid filter sprawl: Keep filters simple for maintainability