Skip to content

Commit 5268681

Browse files
authored
Input plugins listing that all need YAML examples and standard layout cleanup. Fixes #1859. (#1860)
* Adding YAML examples and standardizing shell usage, part of issue #1859. Signed-off-by: Eric D. Schabell <[email protected]> * Adding YAML examples and standardizing shell usage for splunk input plugin, part of issue #1859. Signed-off-by: Eric D. Schabell <[email protected]> * Adding YAML examples and standardizing shell usage for Standard Input input plugin, part of issue #1859. Signed-off-by: Eric D. Schabell <[email protected]> * Adding YAML examples and standardizing shell usage for Statsd input plugin, part of issue #1859. Signed-off-by: Eric D. Schabell <[email protected]> * Adding YAML examples and standardizing shell usage for Syslog input plugin, part of issue #1859. Signed-off-by: Eric D. Schabell <[email protected]> * Adding YAML examples and standardizing shell usage for Systemd input plugin, part of issue #1859. Signed-off-by: Eric D. Schabell <[email protected]> * Adding YAML examples and standardizing shell usage for Tail input plugin, part of issue #1859. Signed-off-by: Eric D. Schabell <[email protected]> * Adding YAML examples and standardizing shell usage for TCP input plugin, part of issue #1859. Signed-off-by: Eric D. Schabell <[email protected]> * Adding YAML examples and standardizing shell usage for Thermal input plugin, part of issue #1859. Signed-off-by: Eric D. Schabell <[email protected]> * Adding YAML examples and standardizing shell usage for UDP input plugin, part of issue #1859. Signed-off-by: Eric D. Schabell <[email protected]> * Adding YAML examples and standardizing shell usage for Windows Event Log input plugin, part of issue #1859. Signed-off-by: Eric D. Schabell <[email protected]> * Adding YAML examples and standardizing shell usage for Windows Event Log (winevtlog) input plugin, part of issue #1859. Signed-off-by: Eric D. Schabell <[email protected]> * Adding YAML examples and standardizing shell usage for Windows Exporter Metrics input plugin, part of issue #1859. Signed-off-by: Eric D. Schabell <[email protected]> --------- Signed-off-by: Eric D. Schabell <[email protected]>
1 parent 75bcc3c commit 5268681

13 files changed

+623
-321
lines changed

pipeline/inputs/serial-interface.md

Lines changed: 92 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -24,31 +24,47 @@ To retrieve messages by using the Serial interface, you can run the plugin from
2424
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.
2525

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

3030
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`.
3131

3232
```shell
33-
echo 'this is some message' > /dev/tnt1
33+
$ echo 'this is some message' > /dev/tnt1
3434
```
3535

3636
In Fluent Bit you can run the command:
3737

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

4242
Which should produce output like:
4343

4444
```text
45-
Fluent Bit v1.x.x
46-
* Copyright (C) 2019-2020 The Fluent Bit Authors
47-
* Copyright (C) 2015-2018 Treasure Data
45+
Fluent Bit v4.0.3
46+
* Copyright (C) 2015-2025 The Fluent Bit Authors
4847
* Fluent Bit is a CNCF sub-project under the umbrella of Fluentd
4948
* https://fluentbit.io
5049
51-
[2016/05/20 15:44:39] [ info] starting engine
50+
______ _ _ ______ _ _ ___ _____
51+
| ___| | | | | ___ (_) | / || _ |
52+
| |_ | |_ _ ___ _ __ | |_ | |_/ /_| |_ __ __/ /| || |/' |
53+
| _| | | | | |/ _ \ '_ \| __| | ___ \ | __| \ \ / / /_| || /| |
54+
| | | | |_| | __/ | | | |_ | |_/ / | |_ \ V /\___ |\ |_/ /
55+
\_| |_|\__,_|\___|_| |_|\__| \____/|_|\__| \_/ |_(_)___/
56+
57+
58+
[2025/07/01 14:44:47] [ info] [fluent bit] version=4.0.3, commit=f5f5f3c17d, pid=1
59+
[2025/07/01 14:44:47] [ info] [storage] ver=1.5.3, type=memory, sync=normal, checksum=off, max_chunks_up=128
60+
[2025/07/01 14:44:47] [ info] [simd ] disabled
61+
[2025/07/01 14:44:47] [ info] [cmetrics] version=1.0.3
62+
[2025/07/01 14:44:47] [ info] [ctraces ] version=0.6.6
63+
[2025/07/01 14:44:47] [ info] [input:mem:mem.0] initializing
64+
[2025/07/01 14:44:47] [ info] [input:mem:mem.0] storage_strategy='memory' (memory only)
65+
[2025/07/01 14:44:47] [ info] [sp] stream processor started
66+
[2025/07/01 14:44:47] [ info] [engine] Shutdown Grace Period=5, Shutdown Input Grace Period=2
67+
[2025/07/01 14:44:47] [ info] [output:stdout:stdout.0] worker #0 started
5268
[0] data: [1463780680, {"msg"=>"this is some message"}]
5369
```
5470

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

5975
```shell
60-
echo 'aaXbbXccXddXee' > /dev/tnt1
76+
$ echo 'aaXbbXccXddXee' > /dev/tnt1
6177
```
6278

6379
Then, run Fluent Bit:
6480

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

6985
This should produce results similar to the following:
7086

7187
```text
72-
Fluent-Bit v0.8.0
73-
Copyright (C) Treasure Data
88+
Fluent Bit v4.0.3
89+
* Copyright (C) 2015-2025 The Fluent Bit Authors
90+
* Fluent Bit is a CNCF sub-project under the umbrella of Fluentd
91+
* https://fluentbit.io
7492
75-
[2016/05/20 16:04:51] [ info] starting engine
93+
______ _ _ ______ _ _ ___ _____
94+
| ___| | | | | ___ (_) | / || _ |
95+
| |_ | |_ _ ___ _ __ | |_ | |_/ /_| |_ __ __/ /| || |/' |
96+
| _| | | | | |/ _ \ '_ \| __| | ___ \ | __| \ \ / / /_| || /| |
97+
| | | | |_| | __/ | | | |_ | |_/ / | |_ \ V /\___ |\ |_/ /
98+
\_| |_|\__,_|\___|_| |_|\__| \____/|_|\__| \_/ |_(_)___/
99+
100+
101+
[2025/07/01 14:44:47] [ info] [fluent bit] version=4.0.3, commit=f5f5f3c17d, pid=1
102+
[2025/07/01 14:44:47] [ info] [storage] ver=1.5.3, type=memory, sync=normal, checksum=off, max_chunks_up=128
103+
[2025/07/01 14:44:47] [ info] [simd ] disabled
104+
[2025/07/01 14:44:47] [ info] [cmetrics] version=1.0.3
105+
[2025/07/01 14:44:47] [ info] [ctraces ] version=0.6.6
106+
[2025/07/01 14:44:47] [ info] [input:mem:mem.0] initializing
107+
[2025/07/01 14:44:47] [ info] [input:mem:mem.0] storage_strategy='memory' (memory only)
108+
[2025/07/01 14:44:47] [ info] [sp] stream processor started
109+
[2025/07/01 14:44:47] [ info] [engine] Shutdown Grace Period=5, Shutdown Input Grace Period=2
110+
[2025/07/01 14:44:47] [ info] [output:stdout:stdout.0] worker #0 started
76111
[0] data: [1463781902, {"msg"=>"aa"}]
77112
[1] data: [1463781902, {"msg"=>"bb"}]
78113
[2] data: [1463781902, {"msg"=>"cc"}]
@@ -83,7 +118,27 @@ Copyright (C) Treasure Data
83118

84119
In your main configuration file append the following sections:
85120

86-
```python
121+
{% tabs %}
122+
{% tab title="fluent-bit.yaml" %}
123+
124+
```yaml
125+
pipeline:
126+
inputs:
127+
- name: serial
128+
tag: data
129+
file: /dev/tnt0
130+
bitrate: 9600
131+
separator: X
132+
133+
outputs:
134+
- name: stdout
135+
match: '*'
136+
```
137+
138+
{% endtab %}
139+
{% tab title="fluent-bit.conf" %}
140+
141+
```text
87142
[INPUT]
88143
Name serial
89144
Tag data
@@ -96,6 +151,9 @@ In your main configuration file append the following sections:
96151
Match *
97152
```
98153

154+
{% endtab %}
155+
{% endtabs %}
156+
99157
## Emulating a serial interface on Linux
100158

101159
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.
@@ -104,43 +162,45 @@ You can emulate a serial interface on your Linux system and test the serial inpu
104162

105163
1. Download the sources:
106164

107-
```bash
108-
git clone https://github.com/freemed/tty0tty
165+
```shell
166+
$ git clone https://github.com/freemed/tty0tty
109167
```
110168

111-
1. Unpack and compile:
169+
2. Unpack and compile:
112170

113-
```bash
114-
cd tty0tty/module
115-
make
171+
```shell
172+
$ cd tty0tty/module
173+
174+
$ make
116175
```
117176

118-
1. Copy the new kernel module into the kernel modules directory:
177+
3. Copy the new kernel module into the kernel modules directory:
119178

120-
```bash
121-
sudo cp tty0tty.ko /lib/modules/$(uname -r)/kernel/drivers/misc/
179+
```shell
180+
$ sudo cp tty0tty.ko /lib/modules/$(uname -r)/kernel/drivers/misc/
122181
```
123182

124-
1. Load the module:
183+
4. Load the module:
125184

126-
```bash
127-
sudo depmod
128-
sudo modprobe tty0tty
185+
```shell
186+
$ sudo depmod
187+
188+
$ sudo modprobe tty0tty
129189
```
130190

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

133-
1. Give appropriate permissions to the new serial ports:
193+
5. Give appropriate permissions to the new serial ports:
134194

135-
```bash
136-
sudo chmod 666 /dev/tnt*
195+
```shell
196+
$ sudo chmod 666 /dev/tnt*
137197
```
138198

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

141-
```bash
201+
```text
142202
/dev/tnt0 <=> /dev/tnt1
143203
/dev/tnt2 <=> /dev/tnt3
144204
/dev/tnt4 <=> /dev/tnt5
145205
/dev/tnt6 <=> /dev/tnt7
146-
```
206+
```

pipeline/inputs/splunk.md

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,33 @@ To use the other tags for multiple instantiating input Splunk plugins, you must
4141

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

44-
```bash
45-
fluent-bit -i splunk -p port=8088 -o stdout
44+
```shell
45+
$ fluent-bit -i splunk -p port=8088 -o stdout
4646
```
4747

4848
### Configuration file
4949

5050
In your main configuration file append the following sections:
5151

52-
```python
52+
{% tabs %}
53+
{% tab title="fluent-bit.yaml" %}
54+
55+
```yaml
56+
pipeline:
57+
inputs:
58+
- name: splunk
59+
listen: 0.0.0.0
60+
port: 8088
61+
62+
outputs:
63+
- name: stdout
64+
match: '*'
65+
```
66+
67+
{% endtab %}
68+
{% tab title="fluent-bit.conf" %}
69+
70+
```text
5371
[INPUT]
5472
name splunk
5573
listen 0.0.0.0
@@ -59,3 +77,6 @@ In your main configuration file append the following sections:
5977
name stdout
6078
match *
6179
```
80+
81+
{% endtab %}
82+
{% endtabs %}

0 commit comments

Comments
 (0)