Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
124 changes: 92 additions & 32 deletions pipeline/inputs/serial-interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,31 +24,47 @@ To retrieve messages by using the Serial interface, you can run the plugin from
The following example loads the input serial plugin where it set a `Bitrate` of `9600`, listens from the `/dev/tnt0` interface, and uses the custom tag `data` to route the message.

```shell
fluent-bit -i serial -t data -p File=/dev/tnt0 -p BitRate=9600 -o stdout -m '*'
$ fluent-bit -i serial -t data -p File=/dev/tnt0 -p BitRate=9600 -o stdout -m '*'
```

The interface (`/dev/tnt0`) is an emulation of the serial interface. Further examples will write some message to the other end of the interface. For example, `/dev/tnt1`.

```shell
echo 'this is some message' > /dev/tnt1
$ echo 'this is some message' > /dev/tnt1
```

In Fluent Bit you can run the command:

```bash
fluent-bit -i serial -t data -p File=/dev/tnt0 -p BitRate=9600 -o stdout -m '*'
```shell
$ fluent-bit -i serial -t data -p File=/dev/tnt0 -p BitRate=9600 -o stdout -m '*'
```

Which should produce output like:

```text
Fluent Bit v1.x.x
* Copyright (C) 2019-2020 The Fluent Bit Authors
* Copyright (C) 2015-2018 Treasure Data
Fluent Bit v4.0.3
* Copyright (C) 2015-2025 The Fluent Bit Authors
* Fluent Bit is a CNCF sub-project under the umbrella of Fluentd
* https://fluentbit.io

[2016/05/20 15:44:39] [ info] starting engine
______ _ _ ______ _ _ ___ _____
| ___| | | | | ___ (_) | / || _ |
| |_ | |_ _ ___ _ __ | |_ | |_/ /_| |_ __ __/ /| || |/' |
| _| | | | | |/ _ \ '_ \| __| | ___ \ | __| \ \ / / /_| || /| |
| | | | |_| | __/ | | | |_ | |_/ / | |_ \ V /\___ |\ |_/ /
\_| |_|\__,_|\___|_| |_|\__| \____/|_|\__| \_/ |_(_)___/


[2025/07/01 14:44:47] [ info] [fluent bit] version=4.0.3, commit=f5f5f3c17d, pid=1
[2025/07/01 14:44:47] [ info] [storage] ver=1.5.3, type=memory, sync=normal, checksum=off, max_chunks_up=128
[2025/07/01 14:44:47] [ info] [simd ] disabled
[2025/07/01 14:44:47] [ info] [cmetrics] version=1.0.3
[2025/07/01 14:44:47] [ info] [ctraces ] version=0.6.6
[2025/07/01 14:44:47] [ info] [input:mem:mem.0] initializing
[2025/07/01 14:44:47] [ info] [input:mem:mem.0] storage_strategy='memory' (memory only)
[2025/07/01 14:44:47] [ info] [sp] stream processor started
[2025/07/01 14:44:47] [ info] [engine] Shutdown Grace Period=5, Shutdown Input Grace Period=2
[2025/07/01 14:44:47] [ info] [output:stdout:stdout.0] worker #0 started
[0] data: [1463780680, {"msg"=>"this is some message"}]
```

Expand All @@ -57,22 +73,41 @@ Using the `Separator` configuration, you can send multiple messages at once.
Run this command after starting Fluent Bit:

```shell
echo 'aaXbbXccXddXee' > /dev/tnt1
$ echo 'aaXbbXccXddXee' > /dev/tnt1
```

Then, run Fluent Bit:

```shell
fluent-bit -i serial -t data -p File=/dev/tnt0 -p BitRate=9600 -p Separator=X -o stdout -m '*'
$ fluent-bit -i serial -t data -p File=/dev/tnt0 -p BitRate=9600 -p Separator=X -o stdout -m '*'
```

This should produce results similar to the following:

```text
Fluent-Bit v0.8.0
Copyright (C) Treasure Data
Fluent Bit v4.0.3
* Copyright (C) 2015-2025 The Fluent Bit Authors
* Fluent Bit is a CNCF sub-project under the umbrella of Fluentd
* https://fluentbit.io

[2016/05/20 16:04:51] [ info] starting engine
______ _ _ ______ _ _ ___ _____
| ___| | | | | ___ (_) | / || _ |
| |_ | |_ _ ___ _ __ | |_ | |_/ /_| |_ __ __/ /| || |/' |
| _| | | | | |/ _ \ '_ \| __| | ___ \ | __| \ \ / / /_| || /| |
| | | | |_| | __/ | | | |_ | |_/ / | |_ \ V /\___ |\ |_/ /
\_| |_|\__,_|\___|_| |_|\__| \____/|_|\__| \_/ |_(_)___/


[2025/07/01 14:44:47] [ info] [fluent bit] version=4.0.3, commit=f5f5f3c17d, pid=1
[2025/07/01 14:44:47] [ info] [storage] ver=1.5.3, type=memory, sync=normal, checksum=off, max_chunks_up=128
[2025/07/01 14:44:47] [ info] [simd ] disabled
[2025/07/01 14:44:47] [ info] [cmetrics] version=1.0.3
[2025/07/01 14:44:47] [ info] [ctraces ] version=0.6.6
[2025/07/01 14:44:47] [ info] [input:mem:mem.0] initializing
[2025/07/01 14:44:47] [ info] [input:mem:mem.0] storage_strategy='memory' (memory only)
[2025/07/01 14:44:47] [ info] [sp] stream processor started
[2025/07/01 14:44:47] [ info] [engine] Shutdown Grace Period=5, Shutdown Input Grace Period=2
[2025/07/01 14:44:47] [ info] [output:stdout:stdout.0] worker #0 started
[0] data: [1463781902, {"msg"=>"aa"}]
[1] data: [1463781902, {"msg"=>"bb"}]
[2] data: [1463781902, {"msg"=>"cc"}]
Expand All @@ -83,7 +118,27 @@ Copyright (C) Treasure Data

In your main configuration file append the following sections:

```python
{% tabs %}
{% tab title="fluent-bit.yaml" %}

```yaml
pipeline:
inputs:
- name: serial
tag: data
file: /dev/tnt0
bitrate: 9600
separator: X

outputs:
- name: stdout
match: '*'
```

{% endtab %}
{% tab title="fluent-bit.conf" %}

```text
[INPUT]
Name serial
Tag data
Expand All @@ -96,6 +151,9 @@ In your main configuration file append the following sections:
Match *
```

{% endtab %}
{% endtabs %}

## Emulating a serial interface on Linux

You can emulate a serial interface on your Linux system and test the serial input plugin locally when you don't have an interface in your computer. The following procedure has been tested on Ubuntu 15.04 running Linux Kernel 4.0.
Expand All @@ -104,43 +162,45 @@ You can emulate a serial interface on your Linux system and test the serial inpu

1. Download the sources:

```bash
git clone https://github.com/freemed/tty0tty
```shell
$ git clone https://github.com/freemed/tty0tty
```

1. Unpack and compile:
2. Unpack and compile:

```bash
cd tty0tty/module
make
```shell
$ cd tty0tty/module

$ make
```

1. Copy the new kernel module into the kernel modules directory:
3. Copy the new kernel module into the kernel modules directory:

```bash
sudo cp tty0tty.ko /lib/modules/$(uname -r)/kernel/drivers/misc/
```shell
$ sudo cp tty0tty.ko /lib/modules/$(uname -r)/kernel/drivers/misc/
```

1. Load the module:
4. Load the module:

```bash
sudo depmod
sudo modprobe tty0tty
```shell
$ sudo depmod

$ sudo modprobe tty0tty
```

You should see new serial ports in `dev` (`ls /dev/tnt\*\`).

1. Give appropriate permissions to the new serial ports:
5. Give appropriate permissions to the new serial ports:

```bash
sudo chmod 666 /dev/tnt*
```shell
$ sudo chmod 666 /dev/tnt*
```

When the module is loaded, it will interconnect the following virtual interfaces:

```bash
```text
/dev/tnt0 <=> /dev/tnt1
/dev/tnt2 <=> /dev/tnt3
/dev/tnt4 <=> /dev/tnt5
/dev/tnt6 <=> /dev/tnt7
```
```
27 changes: 24 additions & 3 deletions pipeline/inputs/splunk.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,33 @@ To use the other tags for multiple instantiating input Splunk plugins, you must

From the command line you can configure Fluent Bit to handle HTTP HEC requests with the following options:

```bash
fluent-bit -i splunk -p port=8088 -o stdout
```shell
$ fluent-bit -i splunk -p port=8088 -o stdout
```

### Configuration file

In your main configuration file append the following sections:

```python
{% tabs %}
{% tab title="fluent-bit.yaml" %}

```yaml
pipeline:
inputs:
- name: splunk
listen: 0.0.0.0
port: 8088

outputs:
- name: stdout
match: '*'
```

{% endtab %}
{% tab title="fluent-bit.conf" %}

```text
[INPUT]
name splunk
listen 0.0.0.0
Expand All @@ -59,3 +77,6 @@ In your main configuration file append the following sections:
name stdout
match *
```

{% endtab %}
{% endtabs %}
Loading