Skip to content

Commit e68ae1a

Browse files
committed
Updated ebpf input plugin doc with new config options and cleanup. Fixes #2239.
Signed-off-by: Eric D. Schabell <[email protected]>
1 parent 99da2f0 commit e68ae1a

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed

pipeline/inputs/ebpf.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,16 @@ The `in_ebpf` input plugin uses eBPF (extended Berkeley Packet Filter) to captur
88

99
The `in_ebpf` plugin leverages eBPF to trace kernel events in real-time. By specifying trace points, users can collect targeted system-level metrics and events, giving visibility into operating system interactions and performance characteristics.
1010

11+
## Configuration parameters
12+
13+
The plugin supports the following configuration parameters:
14+
15+
| Key | Description | Default |
16+
|:----|:------------|:--------|
17+
| `poll_ms` | Set the polling interval in milliseconds for collecting events from the ring buffer. | `1000` |
18+
| `ringbuf_map_name` | Set the name of the eBPF ring buffer map to read events from. | `events` |
19+
| `trace` | Set the eBPF trace to enable (for example, `trace_bind`, `trace_malloc`, `trace_signal`). Can be set multiple times to enable multiple traces. | _none_ |
20+
1121
## System dependencies
1222

1323
To enable `in_ebpf`, ensure the following dependencies are installed on your system:
@@ -75,6 +85,7 @@ Here's a basic example of how to configure the plugin:
7585
pipeline:
7686
inputs:
7787
- name: ebpf
88+
poll_ms: 500
7889
trace:
7990
- trace_signal
8091
- trace_malloc
@@ -87,6 +98,7 @@ pipeline:
8798
```text
8899
[INPUT]
89100
Name ebpf
101+
Poll_Ms 500
90102
Trace trace_signal
91103
Trace trace_malloc
92104
Trace trace_bind
@@ -103,3 +115,49 @@ The configuration enables tracing for:
103115

104116
You can enable multiple traces by adding multiple `Trace` directives in your configuration.
105117
Full list of existing traces can be seen here: [Fluent Bit eBPF Traces](https://github.com/fluent/fluent-bit/tree/master/plugins/in_ebpf/traces)
118+
119+
## Output fields
120+
121+
Each trace produces records with common fields and trace-specific fields.
122+
123+
### Common fields
124+
125+
All traces include the following fields:
126+
127+
| Field | Description |
128+
|:------|:------------|
129+
| `event_type` | Type of event (`signal`, `malloc`, or `bind`). |
130+
| `pid` | Process ID that generated the event. |
131+
| `tid` | Thread ID that generated the event. |
132+
| `comm` | Command name (process name) that generated the event. |
133+
134+
### Signal trace fields
135+
136+
The `trace_signal` trace includes these additional fields:
137+
138+
| Field | Description |
139+
|:------|:------------|
140+
| `signal` | Signal number that was sent. |
141+
| `tpid` | Target process ID that received the signal. |
142+
143+
### Memory trace fields
144+
145+
The `trace_malloc` trace includes these additional fields:
146+
147+
| Field | Description |
148+
|:------|:------------|
149+
| `operation` | Memory operation type (for example, `0` = `malloc`, `1` = `free`, `2` = `calloc`, `3` = `realloc`). |
150+
| `address` | Memory address of the operation. |
151+
| `size` | Size of the memory operation in bytes. |
152+
153+
### Bind trace fields
154+
155+
The `trace_bind` trace includes these additional fields:
156+
157+
| Field | Description |
158+
|:------|:------------|
159+
| `uid` | User ID of the process. |
160+
| `gid` | Group ID of the process. |
161+
| `port` | Port number the socket is binding to. |
162+
| `bound_dev_if` | Network device interface the socket is bound to. |
163+
| `error_raw` | Error code for the bind operation (`0` indicates success). |

0 commit comments

Comments
 (0)