You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pipeline/inputs/ebpf.md
+58Lines changed: 58 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,16 @@ The `in_ebpf` input plugin uses eBPF (extended Berkeley Packet Filter) to captur
8
8
9
9
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.
10
10
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
+
11
21
## System dependencies
12
22
13
23
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:
75
85
pipeline:
76
86
inputs:
77
87
- name: ebpf
88
+
poll_ms: 500
78
89
trace:
79
90
- trace_signal
80
91
- trace_malloc
@@ -87,6 +98,7 @@ pipeline:
87
98
```text
88
99
[INPUT]
89
100
Name ebpf
101
+
Poll_Ms 500
90
102
Trace trace_signal
91
103
Trace trace_malloc
92
104
Trace trace_bind
@@ -103,3 +115,49 @@ The configuration enables tracing for:
103
115
104
116
You can enable multiple traces by adding multiple `Trace` directives in your configuration.
105
117
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