Skip to content

Commit c51f35f

Browse files
committed
pipeline: input: ebpf: style
Signed-off-by: Lynette Miles <[email protected]>
1 parent 68be52a commit c51f35f

File tree

1 file changed

+41
-35
lines changed

1 file changed

+41
-35
lines changed

pipeline/inputs/ebpf.md

Lines changed: 41 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,25 @@
1-
# `in_ebpf` Input Plugin for Fluent Bit (Experimental)
1+
# `in_ebpf` input plugin for Fluent Bit (experimental)
22

3-
> **Note:** This plugin is experimental and may be unstable. Use it in development or testing environments only, as its features and behavior are subject to change.
3+
{% hint style="info" %}
4+
This plugin is experimental and might be unstable. Use it in development or testing environments only. Its features and behavior are subject to change.
5+
{% endhint %}
46

5-
The `in_ebpf` input plugin is an **experimental** plugin for Fluent Bit that uses eBPF (extended Berkeley Packet Filter) to capture low-level system events. This plugin allows Fluent Bit to monitor kernel-level activities such as process executions, file accesses, memory allocations, network connections, and signal handling. It provides valuable insights into system behavior for debugging, monitoring, and security analysis.
7+
The `in_ebpf` input plugin is an experimental plugin for Fluent Bit that uses eBPF (extended Berkeley Packet Filter) to capture low-level system events. This plugin lets Fluent Bit monitor kernel-level activities such as process executions, file accesses, memory allocations, network connections, and signal handling. It provides valuable insights into system behavior for debugging, monitoring, and security analysis.
68

7-
## Overview
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.
810

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, which can be particularly useful for gaining visibility into operating system interactions and performance characteristics.
10-
11-
## System Dependencies
11+
## System dependencies
1212

1313
To enable `in_ebpf`, ensure the following dependencies are installed on your system:
14-
- **Kernel Version**: 4.18 or higher with eBPF support enabled.
15-
- **Required Packages**:
14+
15+
- **Kernel version**: 4.18 or higher with eBPF support enabled.
16+
- **Required packages**:
1617
- `bpftool`: Used to manage and debug eBPF programs.
1718
- `libbpf-dev`: Provides the `libbpf` library for loading and interacting with eBPF programs.
1819
- **CMake** 3.13 or higher: Required for building the plugin.
1920

20-
### Installing Dependencies on Ubuntu
21+
### Installing dependencies on Ubuntu
22+
2123
```bash
2224
sudo apt update
2325
sudo apt install libbpf-dev linux-tools-common cmake
@@ -27,50 +29,54 @@ sudo apt install libbpf-dev linux-tools-common cmake
2729

2830
To enable the `in_ebpf` plugin, follow these steps to build Fluent Bit from source:
2931

30-
1. **Clone the Fluent Bit Repository**
31-
```bash
32-
git clone https://github.com/fluent/fluent-bit.git
33-
cd fluent-bit
34-
```
32+
1. Clone the Fluent Bit repository:
3533

36-
2. **Configure the Build with `in_ebpf`**
34+
```bash
35+
git clone https://github.com/fluent/fluent-bit.git
36+
cd fluent-bit
37+
```
3738

38-
Create a build directory and run `cmake` with the `-DFLB_IN_EBPF=On` flag to enable the `in_ebpf` plugin:
39-
```bash
40-
mkdir build
41-
cd build
42-
cmake .. -DFLB_IN_EBPF=On
43-
```
39+
1. Configure the build with `in_ebpf`:
4440

45-
3. **Compile the Source**
46-
```bash
47-
make
48-
```
41+
Create a build directory and run `cmake` with the `-DFLB_IN_EBPF=On` flag to enable the `in_ebpf` plugin:
4942

50-
4. **Run Fluent Bit**
43+
```bash
44+
mkdir build
45+
cd build
46+
cmake .. -DFLB_IN_EBPF=On
47+
```
5148

52-
Run Fluent Bit with elevated permissions (e.g., `sudo`), as loading eBPF programs requires root access or appropriate privileges:
53-
```bash
54-
sudo ./bin/fluent-bit -c path/to/your_config.conf
55-
```
49+
1. Compile the source:
50+
51+
```bash
52+
make
53+
```
54+
55+
1. Run Fluent Bit:
56+
57+
Run Fluent Bit with elevated permissions (for example, `sudo`). Loading eBPF programs requires root access or appropriate privileges.
5658

57-
## Configuration Example
59+
```bash
60+
sudo ./bin/fluent-bit -c path/to/your_config.conf
61+
```
62+
63+
## Configuration example
5864

5965
Here's a basic example of how to configure the plugin:
6066

61-
```
67+
```python
6268
[INPUT]
6369
Name ebpf
6470
Trace trace_signal
6571
Trace trace_malloc
6672
Trace trace_bind
6773
```
6874

69-
The configuration above enables tracing for:
75+
The configuration enables tracing for:
76+
7077
- Signal handling events (`trace_signal`)
7178
- Memory allocation events (`trace_malloc`)
7279
- Network bind operations (`trace_bind`)
7380

7481
You can enable multiple traces by adding multiple `Trace` directives in your configuration.
7582
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)
76-

0 commit comments

Comments
 (0)