@@ -23,34 +23,69 @@ The MQTT input plugin lets Fluent Bit behave as a server. Dispatch some messages
23
23
24
24
Running the following command:
25
25
26
- ``` bash
27
- fluent-bit -i mqtt -t data -o stdout -m ' *'
26
+ ``` shell
27
+ $ fluent-bit -i mqtt -t data -o stdout -m ' *'
28
28
```
29
29
30
30
Returns a response like the following:
31
31
32
32
``` text
33
- Fluent Bit v1.x.x
34
- * Copyright (C) 2019-2020 The Fluent Bit Authors
35
- * Copyright (C) 2015-2018 Treasure Data
33
+ Fluent Bit v4.0.3
34
+ * Copyright (C) 2015-2025 The Fluent Bit Authors
36
35
* Fluent Bit is a CNCF sub-project under the umbrella of Fluentd
37
36
* https://fluentbit.io
38
37
39
- [2016/05/20 14:22:52] [ info] starting engine
38
+ ______ _ _ ______ _ _ ___ _____
39
+ | ___| | | | | ___ (_) | / || _ |
40
+ | |_ | |_ _ ___ _ __ | |_ | |_/ /_| |_ __ __/ /| || |/' |
41
+ | _| | | | | |/ _ \ '_ \| __| | ___ \ | __| \ \ / / /_| || /| |
42
+ | | | | |_| | __/ | | | |_ | |_/ / | |_ \ V /\___ |\ |_/ /
43
+ \_| |_|\__,_|\___|_| |_|\__| \____/|_|\__| \_/ |_(_)___/
44
+
45
+
46
+ [2025/07/01 14:44:47] [ info] [fluent bit] version=4.0.3, commit=f5f5f3c17d, pid=1
47
+ [2025/07/01 14:44:47] [ info] [storage] ver=1.5.3, type=memory, sync=normal, checksum=off, max_chunks_up=128
48
+ [2025/07/01 14:44:47] [ info] [simd ] disabled
49
+ [2025/07/01 14:44:47] [ info] [cmetrics] version=1.0.3
50
+ [2025/07/01 14:44:47] [ info] [ctraces ] version=0.6.6
51
+ [2025/07/01 14:44:47] [ info] [input:mem:mem.0] initializing
52
+ [2025/07/01 14:44:47] [ info] [input:mem:mem.0] storage_strategy='memory' (memory only)
53
+ [2025/07/01 14:44:47] [ info] [sp] stream processor started
54
+ [2025/07/01 14:44:47] [ info] [engine] Shutdown Grace Period=5, Shutdown Input Grace Period=2
55
+ [2025/07/01 14:44:47] [ info] [output:stdout:stdout.0] worker #0 started
40
56
[0] data: [1463775773, {"topic"=>"some/topic", "key1"=>123, "key2"=>456}]
41
57
```
42
58
43
59
The following command line will send a message to the MQTT input plugin:
44
60
45
- ``` bash
46
- mosquitto_pub -m ' {"key1": 123, "key2": 456}' -t some/topic
61
+ ``` shell
62
+ $ mosquitto_pub -m ' {"key1": 123, "key2": 456}' -t some/topic
47
63
```
48
64
49
65
### Configuration file
50
66
51
- In your main configuration file append the following ` Input ` and ` Output ` sections:
67
+ In your main configuration file append the following:
68
+
69
+ {% tabs %}
70
+ {% tab title="fluent-bit.yaml" %}
71
+
72
+ ``` yaml
73
+ pipeline :
74
+ inputs :
75
+ - name : mqtt
76
+ tag : data
77
+ listen : 0.0.0.0
78
+ port : 1883
79
+
80
+ outputs :
81
+ - name : stdout
82
+ match : ' *'
83
+ ` ` `
84
+
85
+ {% endtab %}
86
+ {% tab title="fluent-bit.conf" %}
52
87
53
- ``` python
88
+ ` ` ` text
54
89
[INPUT]
55
90
Name mqtt
56
91
Tag data
@@ -61,3 +96,6 @@ In your main configuration file append the following `Input` and `Output` secti
61
96
Name stdout
62
97
Match *
63
98
```
99
+
100
+ {% endtab %}
101
+ {% endtabs %}
0 commit comments