Skip to content

Commit 5528f41

Browse files
committed
development: fix conflicting
Signed-off-by: Takahiro YAMASHITA <nokute78@gmail.com>
2 parents e82f4a8 + 216f86e commit 5528f41

19 files changed

+277
-87
lines changed

README.md

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
# Fluent Bit v0.8 Documentation
1+
![](imgs/logo_documentation_0.9.png)
22

3-
[Fluent Bit](http://fluentbit.io) is a lightweight and optimized events data collector for Linux, Embedded Linux, OSX and BSD family operating systems. It has been made with a strong focus on IoT to allow the collection of events from different sources like network protocols, hardware radios and IoT frameworks.
3+
[Fluent Bit](http://fluentbit.io) is a Fast and Lightweight Data Forwarder for Linux, OSX and BSD family operating systems. It has been made with a strong focus on performance to allow the collection of events from different sources without complexity.
44

5-
[Fluent Bit](http://fluentbit.io) is part of the [Fluentd](http://fluentd.org) project ecosystem, it's licensed under the terms of the [Apache License v2.0](http://www.apache.org/licenses/LICENSE-2.0).
6-
7-
This project is made and sponsored by [Treasure Data](https://www.treasuredata.com).
5+
[Fluent Bit](http://fluentbit.io) is part of the [Fluentd](http://fluentd.org) project ecosystem, it's licensed under the terms of the [Apache License v2.0](http://www.apache.org/licenses/LICENSE-2.0). This project is made and sponsored by [Treasure Data](https://www.treasuredata.com).

SUMMARY.md

+3
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,16 @@
1717
* [Getting Started](getting_started/README.md)
1818
* [Configuration Schema](getting_started/configuration_schema.md)
1919
* [Configuration File](getting_started/configuration_file.md)
20+
* [TLS / SSL](getting_started/tls_ssl.md)
2021
* [Input Plugins](input/README.md)
2122
* [CPU Usage](input/cpu.md)
2223
* [Forward](input/forward.md)
2324
* [Head](input/head.md)
25+
* [Health](input/health.md)
2426
* [Kernel Log Buffer](input/kmsg.md)
2527
* [Memory Usage](input/mem.md)
2628
* [MQTT](input/mqtt.md)
29+
* [Random](input/random.md)
2730
* [Serial Interface](input/serial.md)
2831
* [Standard Input](input/stdin.md)
2932
* [XBee Radio](input/xbee.md)

about/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# About Fluent Bit
22

3-
[Fluent Bit](http://fluentbit.io) is an open source and multi-platform data collection tool which aims to be a generic Swiss knife for events collection on IoT environments and related hardware devices.
3+
[Fluent Bit](http://fluentbit.io) is an open source and multi-platform data forwarder tool which aims to be a generic Swiss knife for log collection and distribution.
44

5-
We, [Treasure Data](http://treasuredata.com), as a Big Data company, provide an analytics infrastructure in the Cloud where we provide an end-to-end solution to collect, store and do analytics over the data. [Fluent Bit](http://fluentbit.io) is an integral part of this pipeline where it solve the data collection needs where the __source__ information may come from Embedded and IoT environments mostly.
5+
We, [Treasure Data](http://treasuredata.com), as a Big Data company, provide an analytics infrastructure in the Cloud where we provide an end-to-end solution to collect, store and do analytics over the data. [Fluent Bit](http://fluentbit.io) is an integral part of this pipeline where it solve the data collection needs.

about/fluentd_and_fluentbit.md

+12-7
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,23 @@
22

33
Data collection matters and nowadays the scenarios from where the information can _come from_ are very variable. For hence to be more flexible on certain markets needs, we may need different options. On this page we will describe the relationship between the [Fluentd](http://fluentd.org) and [Fluent Bit](http://fluentbit.io) open source projects.
44

5-
[Fluentd](http://fluentd.org) and [Fluent Bit](http://fluentbit.io) projects are both created and sponsored by [Treasure Data](http://treasuredata.com) and they aim to solve the data collection needs but on different scenarios and environments, the following table describe a comparisson on different areas of the projects:
5+
[Fluentd](http://fluentd.org) and [Fluent Bit](http://fluentbit.io) projects are both created and sponsored by [Treasure Data](http://treasuredata.com) and they aim to solve the _Data Collection_ and _Data Forwarding_ needs as a whole.
6+
7+
From an architecture usability perspective:
8+
9+
- Fluentd is an Aggregator.
10+
- Fluent Bit is a Data Forwarder.
11+
12+
The following table describe a comparisson on different areas of the projects:
613

714
| | Fluentd | Fluent Bit |
815
|-----------------------|-----------------------|-----------------------|
9-
| Scope | Servers | Embedded & IoT devices|
16+
| Scope | Containers / Servers | Containers / Servers |
1017
| Language | C & Ruby | C |
11-
| Memory | ~20MB | ~150KB |
18+
| Memory | ~40MB | ~250KB |
1219
| Performance | High Performance | High Performance |
1320
| Dependencies | Built as a Ruby Gem, it requires a certain number of gems. | Zero dependencies, unless some special plugin requires them. |
14-
| Plugins | More than 300 plugins available | Around 15 plugins available|
21+
| Plugins | More than 650 plugins available | Around 20 plugins available|
1522
| License | [Apache License v2.0](http://www.apache.org/licenses/LICENSE-2.0) | [Apache License v2.0](http://www.apache.org/licenses/LICENSE-2.0)|
1623

17-
As described in the table, if the target environment is a server with common capacity, [Fluentd](http://fluentd.org) is a great option due to it flexibility and availability of plugins (more than 300 extensions!) but if the _data collection_ will happen in an Embedded environment or an IoT device where the system capacity is restricted, [Fluent Bit](http://fluentbit.io) is the solution to use.
18-
19-
Both tools are not mutual exclusive, [Fluent Bit](http://fluentbit.io) provides and _output_ plugin to flush the information to a [Fluentd](http://fluentd.org) instance, so they can work together in your architecture or as independent services.
24+
Considering Fluentd as a main Aggregator and Fluent Bit as a Data Forwarder, we can see both projects complement each other providing a full reliable solution.

about/why.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Data collection is hard.
44

5-
Nowadays the number of sources of information that we get in our environments often increase. From an _Embedded/IoT_ perspective the scenario is more complex, devices also provide their own data which can come from sensors, custom applications or the system in general. Considering that these environments may be restrictive in terms of capacity, we need a fast and optimized solution that can deal with:
5+
Nowadays the number of sources of information that we get in our environments often increase. Handling data collection at scale is complex, the ways to collect data from and it formats requires a specialized tool that can deal with:
66

77
- Different sources of information.
88
- Different data formats.

development/ingest_records_manually.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ The following C code snippet shows how to insert a few JSON records into a runni
3131
int main()
3232
{
3333
int ret;
34+
int in_ffd;
35+
int out_ffd;
3436
flb_ctx_t *ctx;
35-
flb_input_t *in;
36-
flb_output_t *out;
3737

3838
/* Create library context */
3939
ctx = flb_create();
@@ -42,15 +42,15 @@ int main()
4242
}
4343

4444
/* Enable the input plugin for manual data ingestion */
45-
in = flb_input(ctx, "lib", NULL);
46-
if (!in) {
45+
in_ffd = flb_input(ctx, "lib", NULL);
46+
if (in_ffd == -1) {
4747
flb_destroy(ctx);
4848
return -1;
4949
}
5050

5151
/* Enable output plugin 'stdout' (print records to the standard output) */
52-
out = flb_output(ctx, "stdout", NULL);
53-
if (!out) {
52+
out_ffd = flb_output(ctx, "stdout", NULL);
53+
if (out_ffd == -1) {
5454
flb_destroy(ctx);
5555
return -1;
5656
}
@@ -63,8 +63,8 @@ int main()
6363
}
6464

6565
/* Ingest data manually */
66-
flb_lib_push(in, JSON_1, sizeof(JSON_1) - 1);
67-
flb_lib_push(in, JSON_2, sizeof(JSON_2) - 1);
66+
flb_lib_push(ctx, in_ffd, JSON_1, sizeof(JSON_1) - 1);
67+
flb_lib_push(ctx, in_ffd, JSON_2, sizeof(JSON_2) - 1);
6868

6969
/* Stop the engine (5 seconds to flush remaining data) */
7070
flb_stop(ctx);

development/library_api.md

+23-25
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,21 @@
77
[Fluent Bit](http://fluentbit.io) runs as a service, meaning that the API exposed for developers provide interfaces to create and manage a context, specify inputs/outputs, set configuration parameters and set routing paths for the event/records. A typical usage of the library involves:
88

99
- Create library instance/context and set properties.
10-
- Enable _input_ plugin(s) instances and set properties.
11-
- Enable _output_ plugin(s) instances and set properties.
10+
- Enable _input_ plugin(s) and set properties.
11+
- Enable _output_ plugin(s) and set properties.
1212
- Start the library runtime.
1313
- Optionally ingest records manually.
1414
- Stop the library runtime.
1515
- Destroy library instance/context.
1616

1717
## Data Types
1818

19-
There are three main data types exposed by the library. All of them including further functions are prefixed with __flb\___. The following table describes them:
19+
Starting from Fluent Bit v0.9, there is only one data type exposed by the library, by convention prefixed with __flb\___.
2020

2121

2222
| Type | Description |
2323
|--------------|----------------------|
2424
| flb_ctx_t | Main library context. It aims to reference the context returned by _flb\_create();_|
25-
| flb_input_t | Reference an enabled _input_ plugin instance. Used to store the output of _flb\_input(...);_ function. |
26-
| flb_output_t | Reference an enabled _output_ plugin instance. Used to store the output of _flb\_output(...);_ function. |
2725

2826
## API Reference
2927

@@ -90,7 +88,7 @@ When built, [Fluent Bit](http://fluentbit.io) library contains a certain number
9088
__Prototype__
9189

9290
```C
93-
flb_input_t *flb_input(flb_ctx_t *ctx, char *name, void *data);
91+
int flb_input(flb_ctx_t *ctx, char *name, void *data);
9492
```
9593
9694
The argument __ctx__ represents the library context created by __flb_create()__, then __name__ is the name of the input plugin that is required to enable.
@@ -99,14 +97,14 @@ The third argument __data__ can be used to pass a custom reference to the plugin
9997
10098
__Return Value__
10199
102-
On success, __flb_input()__ returns the input plugin instance; on error, it returns NULL.
100+
On success, __flb_input()__ returns an integer value >= zero (similar to a file descriptor); on error, it returns a negative number.
103101
104102
__Usage__
105103
106104
```C
107-
flb_input_t *in;
105+
int in_ffd;
108106
109-
in = flb_input(ctx, "cpu", NULL);
107+
in_ffd = flb_input(ctx, "cpu", NULL);
110108
```
111109

112110
### Set Input Plugin Properties
@@ -116,7 +114,7 @@ A plugin instance created through __flb_input()__, may provide some configuratio
116114
__Prototype__
117115

118116
```C
119-
int flb_input_set(flb_input_t *in, ...);
117+
int flb_input_set(flb_ctx_t *ctx, int in_ffd, ...);
120118
```
121119
122120
__Return Value__
@@ -130,13 +128,13 @@ The __flb_input_set()__ allows to set one or more properties in a key/value stri
130128
```C
131129
int ret;
132130
133-
ret = flb_input_set(in,
131+
ret = flb_input_set(ctx, in_ffd,
134132
"tag", "my_records",
135133
"ssl", "false",
136134
NULL);
137135
```
138136

139-
The above example specified the values for the properties __tag__ and __ssl__, note that the value is always a string (char *) and once there is no more parameters a NULL argument must be added at the end of the list.
137+
The argument __ctx__ represents the library context created by __flb_create()__. The above example specified the values for the properties __tag__ and __ssl__, note that the value is always a string (char *) and once there is no more parameters a NULL argument must be added at the end of the list.
140138

141139
The properties allowed per input plugin are specified on each specific plugin documentation.
142140

@@ -149,7 +147,7 @@ When built, [Fluent Bit](http://fluentbit.io) library contains a certain number
149147
__Prototype__
150148

151149
```C
152-
flb_output_t *flb_output(flb_ctx_t *ctx, char *name, void *data);
150+
int flb_output(flb_ctx_t *ctx, char *name, void *data);
153151
```
154152
155153
The argument __ctx__ represents the library context created by __flb_create()__, then __name__ is the name of the output plugin that is required to enable.
@@ -158,14 +156,14 @@ The third argument __data__ can be used to pass a custom reference to the plugin
158156
159157
__Return Value__
160158
161-
On success, __flb_output()__ returns the output plugin instance; on error, it returns NULL.
159+
On success, __flb_output()__ returns the output plugin instance; on error, it returns a negative number.
162160
163161
__Usage__
164162
165163
```C
166-
flb_output_t *out;
164+
int out_ffd;
167165
168-
out = flb_output(ctx, "stdout", NULL);
166+
out_ffd = flb_output(ctx, "stdout", NULL);
169167
```
170168

171169
### Set Output Plugin Properties
@@ -175,12 +173,12 @@ A plugin instance created through __flb_output()__, may provide some configurati
175173
__Prototype__
176174

177175
```C
178-
int flb_output_set(flb_output_t *in, ...);
176+
int flb_output_set(flb_ctx_t *ctx, int out_ffd, ...);
179177
```
180178
181179
__Return Value__
182180
183-
On success it returns 0; on error it returns a negative number.
181+
On success it returns an integer value >= zero (similar to a file descriptor); on error it returns a negative number.
184182
185183
__Usage__
186184
@@ -189,13 +187,13 @@ The __flb_output_set()__ allows to set one or more properties in a key/value str
189187
```C
190188
int ret;
191189
192-
ret = flb_output_set(in,
193-
"tag", "my_records",
194-
"ssl", "false",
195-
NULL);
190+
ret = flb_output_set(ctx, out_ffd,
191+
"tag", "my_records",
192+
"ssl", "false",
193+
NULL);
196194
```
197195

198-
The above example specified the values for the properties __tag__ and __ssl__, note that the value is always a string (char *) and once there is no more parameters a NULL argument must be added at the end of the list.
196+
The argument __ctx__ represents the library context created by __flb_create()__. The above example specified the values for the properties __tag__ and __ssl__, note that the value is always a string (char *) and once there is no more parameters a NULL argument must be added at the end of the list.
199197

200198
The properties allowed per output plugin are specified on each specific plugin documentation.
201199

@@ -278,10 +276,10 @@ There are some cases where the caller application may want to ingest data into F
278276
__Prototype__
279277

280278
```C
281-
int flb_lib_push(flb_input_t *input, void *data, size_t len);
279+
int flb_lib_push(flb_ctx_t *ctx, int in_ffd, void *data, size_t len);
282280
```
283281
284-
The first argument __input__ is a reference to an input instance of the __lib__ plugin, __data__ is a reference to the message to be ingested and __len__ the number of bytes to take from it.
282+
The first argument is the context created previously through __flb_create()__. __in_ffd__ is the numeric reference of the input plugin (for this case it should be an input of plugin __lib__ type), __data__ is a reference to the message to be ingested and __len__ the number of bytes to take from it.
285283
286284
__Return Value__
287285

getting_started/tls_ssl.md

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# TLS \/ SSL
2+
3+
Fluent Bit provides integrated support for _Transport Layer Security_ \(TLS\) and it predecessor _Secure Sockets Layer_ \(SSL\) respectively. In this section we will refer as TLS only for both implementations.
4+
5+
Each output plugin that requires to perform Network I\/O can optionally enable TLS and configure the behavior. The following table describe the properties available:
6+
7+
| Property | Description | Default |
8+
| --- | --- | --- |
9+
| tls | enable or disable TLS support | Off |
10+
| tls.verify | force certificate validation | On |
11+
| tls.ca\_file | absolute path to CA certificate file | |
12+
| tls.crt\_file | absolute path to Certificate file | |
13+
| tls.key\_file | absolute path to private Key file | |
14+
| tls.key\_passwd | optional password for tls.key\_file file | |
15+
16+
The listed properties can be enabled in the configuration file, specifically on each output plugin section or directly through the command line. The following **output** plugins can take advante of the TLS feature:
17+
18+
* [HTTP](../output/http.md)
19+
* [Elasticsearch](../output/elasticsearch.md)
20+
21+
## Example: enable TLS on HTTP output
22+
23+
By default HTTP output plugin uses plain TCP, enabling TLS from the command line can be done with:
24+
25+
```
26+
$ fluent-bit -i cpu -t cpu -o http://192.168.2.3:80/something \
27+
-p tls=on \
28+
-p tls.verify=off \
29+
-m '*'
30+
31+
```
32+
33+
In the command line above, the two properties _tls_ and _tls.verify_ where enabled for demonstration purposes \(we strongly suggest always keep verification ON\).
34+
35+
The same behavior can be accomplished using a configuration file:
36+
37+
```
38+
[INPUT]
39+
Name cpu
40+
Tag cpu
41+
42+
[OUTPUT]
43+
Name http
44+
Match *
45+
Host 192.168.2.3
46+
Port 80
47+
URI /something
48+
tls On
49+
tls.verify Off
50+
```
51+

imgs/logo_documentation_0.9.png

25.8 KB
Loading

input/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@ The _input plugins_ defines the source from where [Fluent Bit](http://fluentbit.
77
| [cpu](cpu.md) | CPU Usage | measure total CPU usage of the system.|
88
| [forward](forward.md) | Forward | Fluentd forward protocol. |
99
| [head](head.md) | Head | read first part of files. |
10+
| [health](health.md) | Health | Check health of TCP services. |
1011
| [kmsg](kmsg.md) | Kernel Log Buffer | read the Linux Kernel log buffer messages.|
1112
| [mem](mem.md) | Memory Usage | measure the total amount of memory used on the system.|
1213
| [mqtt](mqtt.md) | MQTT | start a MQTT server and receive publish messages. |
14+
| [random](random.md) | Generate Random samples. |
1315
| [serial](serial.md) | Serial Interface | read data information from the serial interface.|
1416
| [stdin](stdin.md) | Standard Input | read data from the standard input. |
1517
| [xbee](xbee.md) | XBee Radio | read data through an XBee Radio device. |

input/forward.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,10 @@ In [Fluent Bit](http://fluentbit.io) we should see the following output:
6262

6363
```bash
6464
$ bin/fluent-bit -i forward -o stdout
65-
Fluent-Bit v0.8.0
65+
Fluent-Bit v0.9.0
6666
Copyright (C) Treasure Data
6767

68-
[2016/06/03 10:18:10] [ info] starting engine
69-
[2016/06/03 10:18:10] [ info] [in_fw] binding 0.0.0.0:24224
70-
[0] my_tag: [1464970691, {"key 1"=>123456789, "key 2"=>"abcdefg"}]
68+
[2016/10/07 21:49:40] [ info] [engine] started
69+
[2016/10/07 21:49:40] [ info] [in_fw] binding 0.0.0.0:24224
70+
[0] my_tag: [1475898594, {"key 1"=>123456789, "key 2"=>"abcdefg"}]
7171
```

0 commit comments

Comments
 (0)