Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Fluent Bit uses very low CPU and Memory consumption, it's compatible with most of x86, x86_64, AArch32 and AArch64 based platforms. In order to build it you need the following components in your system:
Compiler: GCC or clang
CMake
There are not other dependencies besides libc and pthreads in the most basic mode. For certain features that depends on third party components, those are included in the main source code repository.
The following operating systems and architectures are supported in Fluent Bit.
From an architecture support perspective, Fluent Bit is fully functional on x86, x86_64, AArch32 and AArch64 based processors.
Fluent Bit can work also on OSX and *BSD systems, but not all plugins will be available on all platforms. Official support will be expanding based on community demand.
uses as it build system. The suggested procedure to prepare the build system consists on the following steps:
In the following steps you can find exact commands to build and install the project with the default options. If you already know how CMake works you can skip this part and look at the build options available.
Change to the build/ directory inside the Fluent Bit sources:
Let configure the project specifying where the root path is located:
Now you are ready to start the compilation process through the simple make command:
to continue installing the binary on the system just do:
it's likely you may need root privileges so you can try to prefixing the command with sudo.
Fluent Bit provides certain options to CMake that can be enabled or disabled when configuring, please refer to the following tables under the General Options, Input Plugins and Output Plugins sections.
The input plugins provides certain features to gather information from a specific source type which can be a network interface, some built-in metric or through a specific input device, the following input plugins are available:
The output plugins gives the capacity to flush the information to some external interface, service or terminal, the following table describes the output plugins available as of this version:
Operating System
Distribution
Architecture
Linux
Centos 7
x86_64
Debian 8 (Jessie)
x86_64
Debian 9 (Stretch)
x86_64
Raspbian 8 (Debian Jessie)
AArch32
Raspbian 9 (Debian Stretch)
AArch32
Ubuntu 16.04 (Xenial Xerus)
x86_64
Ubuntu 18.04 (Bionic Beaver)
x86_64
option | description | default |
FLB_ALL | Enable all features available | No |
FLB_DEBUG | Build binaries with debug symbols | No |
FLB_JEMALLOC | Use Jemalloc as default memory allocator | No |
FLB_TLS | Buils with SSL/TLS support | No |
FLB_BINARY | Build executable | Yes |
FLB_EXAMPLES | Build examples | Yes |
FLB_SHARED_LIB | Build shared library | Yes |
FLB_VALGRIND | Enable Valgrind support | No |
FLB_TRACE | Enable trace mode | No |
FLB_TESTS_RUNTIME | Enable runtime tests | No |
FLB_TESTS_INTERNAL | Enable internal tests | No |
FLB_TESTS | Enable tests | No |
FLB_MTRACE | Enable mtrace support | No |
FLB_INOTIFY | Enable Inotify support | Yes |
FLB_POSIX_TLS | Force POSIX thread storage | No |
FLB_SQLDB | Enable SQL embedded database support | No |
FLB_HTTP_SERVER | Enable HTTP Server | No |
FLB_BACKTRACE | Enable backtrace/stacktrace support | Yes |
FLB_LUAJIT | Enable Lua scripting support | Yes |
FLB_STATIC_CONF | Build binary using static configuration files. The value of this option must be a directory containing configuration files. |
Fluent Bit in normal operation mode allows to be configurable through text files or using specific arguments in the command line, while this is the ideal deployment case, there are scenarios where a more restricted configuration is required: static configuration mode.
Static configuration mode aims to include a built-in configuration in the final binary of Fluent Bit, disabling the usage of external files or flags at runtime.
The following steps assumes you are familiar with configuring Fluent Bit using text files and you have experience building it from scratch as described in the Build and Install section.
In your file system prepare a specific directory that will be used as an entry point for the build system to lookup and parse the configuration files. It is mandatory that this directory contain as a minimum one configuration file called fluent-bit.conf containing the required SERVICE, INPUT and OUTPUT sections. As an example create a new fluent-bit.conf file with the following content:
the configuration provided above will calculate CPU metrics from the running system and print them to the standard output interface.
Inside Fluent Bit source code, get into the build/ directory and run CMake appending the FLB_STATIC_CONF option pointing the configuration directory recently created, e.g:
then build it:
At this point the fluent-bit binary generated is ready to run without necessity of further configuration:
For production systems, we strongly suggest that you always get the latest stable release from our web site, you can get the official tarballs (.tar.gz) from the following link:
For people who aims to contribute to the project testing or extending the code base, can get the development version from our GIT repository:
Note that our master branch is where the development of Fluent Bit happens. Since it's a development version, expect issues when compiling or at run time.
We encourage everybody to help us testing every development version, at the end this is what will become stable.
The following section will guide you to the step to download, build and install Fluent Bit from sources and specific instructions for the installation of binaries that we already distribute for Debian/Ubuntu/Redhat/CentOS and Raspberry Pi.
If you find some problem on a certain step, don't hesitate to report the problem on our bug tracker:
option | description | default |
Enable CPU input plugin | On |
Enable Forward input plugin | On |
Enable Head input plugin | On |
Enable Health input plugin | On |
Enable Kernel log input plugin | On |
Enable Memory input plugin | On |
FLB_IN_RANDOM | Enable Random input plugin | On |
Enable Serial input plugin | On |
Enable Standard input plugin | On |
FLB_IN_TCP | Enable TCP input plugin | On |
Enable MQTT input plugin | On |
Enable Xbee input plugin | Off |
option | description | default |
On |
On |
Enable HTTP output plugin | On |
Off |
FLB_OUT_PLOT | Enable Plot output plugin | On |
Enable STDOUT output plugin | On |
On |
FLB_OUT_NULL | Enable /dev/null output plugin | On |
Fluent Bit container images are available on Docker Hub ready for production usage. Our stable images are based in Distroless focusing on security containing just the Fluent Bit binary, minimal system libraries and basic configuration.
Optionally, we provide debug images which contains Busybox that can be used to troubleshoot or testing purposes.
The following table describe the tags are available on fluent/fluent-bit repository:
It's strongly suggested that you always use the latest image of Fluent Bit.
Download the last stable image from 1.0 series:
Once the image is in place, now run the following (useless) test which makes Fluent Bit meassure CPU usage by the container:
That command will let Fluent Bit meassure CPU usage every second and flush the results to the standard output, e.g:
Alpine Linux uses Musl C library instead of Glibc. Musl is not fully compatible with Glibc which generated many issues in the following areas when used with Fluent Bit:
Memory Allocator: to run Fluent Bit properly in high-load environments, we use Jemalloc as a default memory allocator which reduce fragmentation and provides better performance for our needs. Jemalloc cannot run smoothly with Musl and requires extra work.
Alpine Linux Musl functions bootstrap have a compatibility issue when loading Golang shared libraries, this generate problems when trying to load Golang output plugins in Fluent Bit.
Alpine Linux Musl Time format parser does not support Glibc extensions
Maintainers preference in terms of base image due to security and maintenance reasons are Distroless and Debian.
Fluent Bit is a lightweight and extensible Log Processor that comes with full support for Kubernetes:
Read Kubernetes/Docker log files from the file system or through Systemd Journal.
Enrich logs with Kubernetes metadata.
Deliver logs to third party storage services like Elasticsearch, InfluxDB, HTTP, etc.
Content:
Before geting started it is important to understand how Fluent Bit will be deployed. Kubernetes manages a cluster of nodes, so our log agent tool will need to run on every node to collect logs from every POD, hence Fluent Bit is deployed as a DaemonSet (a POD that runs on every node of the cluster).
When Fluent Bit runs, it will read, parse and filter the logs of every POD and will enrich each entry with the following information (metadata):
POD Name
POD ID
Container Name
Container ID
Labels
Annotations
To obtain these information, a built-in filter plugin called kubernetes talks to the Kubernetes API Server to retrieve relevant information such as the pod_id, labels and annotations, other fields such as pod_name, container_id and container_name are retrieved locally from the log file names. All of this is handled automatically, no intervention is required from a configuration aspect.
Our Kubernetes Filter plugin is fully inspired on the Fluentd Kubernetes Metadata Filter written by Jimmi Dyson.
Fluent Bit must be deployed as a DaemonSet, so on that way it will be available on every node of your Kubernetes cluster. To get started run the following commands to create the namespace, service account and role setup:
The next step is to create a ConfigMap that will be used by our Fluent Bit DaemonSet:
Fluent Bit DaemonSet ready to be used with Elasticsearch on a normal Kubernetes Cluster:
If you are using Minikube for testing purposes, use the following alternative DaemonSet manifest:
The default configuration of Fluent Bit makes sure of the following:
Consume all containers logs from the running Node.
The Tail input plugin will not append more than 5MB into the engine until they are flushed to the Elasticsearch backend. This limit aims to provide a workaround for backpressure scenarios.
The Kubernetes filter will enrich the logs with Kubernetes metadata, specifically labels and annotations. The filter only goes to the API Server when it cannot find the cached info, otherwise it uses the cache.
The default backend in the configuration is Elasticsearch set by the Elasticsearch Ouput Plugin. It uses the Logstash format to ingest the logs. If you need a different Index and Type, please refer to the plugin option and do your own adjustments.
There is an option called Retry_Limit set to False, that means if Fluent Bit cannot flush the records to Elasticsearch it will re-try indefinitely until it succeed.
source code provides Bitbake recipes to configure, build and package the software for a Yocto based image. Note that specific steps of usage of these recipes in your Yocto environment (Poky) is out of the scope of this documentation.
We distribute two main recipes, one for testing/dev purposes and other with the latest stable release.
It's strongly recommended to always use the stable release of Fluent Bit recipe and not the one from GIT master for production deployments.
When Fluent Bit series v1.0.x is build for an AArch64 target platform, the default backend mechanism for co-routines will be sigaltstack(2), if the compiler flags specified _FORTIFY_SOURCE, it will generate an explicit crash with an error message similar to this one:
the workaround for this problem is to remove the _FORTIFY_SOURCE from the build system.
Fluent Bit v1.1.0 which is under active development on , already integrates native AArch64 support where stack switches for co-routines are done through native ASM calls, on this scenario there is no issues as the one faced with _FORTIFY_SOURCE in previous 1.0.x series.
Fluent Bit is distributed as td-agent-bit package and is available for the latest stable Debian system: Jessie. This stable Fluent Bit distribution package is maintained by .
The first step is to add our server GPG key to your keyring, on that way you can get our signed packages:
On Debian, you need to add our APT server entry to your sources lists, please add the following content at bottom of your /etc/apt/sources.list file:
Now let your system update the apt database:
Using the following apt-get command you are able now to install the latest td-agent-bit:
Now the following step is to instruct systemd to enable the service:
If you do a status check, you should see a similar output like this:
The default configuration of td-agent-bit is collecting metrics of CPU usage and sending the records to the standard output, you can see the outgoing data in your /var/log/syslog file.
Fluent Bit is distributed as td-agent-bit package and is available for the latest stable Ubuntu system: Xenial Xerus. This stable Fluent Bit distribution package is maintained by .
The first step is to add our server GPG key to your keyring, on that way you can get our signed packages:
On Ubuntu, you need to add our APT server entry to your sources lists, please add the following content at bottom of your /etc/apt/sources.list file:
Now let your system update the apt database:
Using the following apt-get command you are able now to install the latest td-agent-bit:
Now the following step is to instruct systemd to enable the service:
If you do a status check, you should see a similar output like this:
The default configuration of td-agent-bit is collecting metrics of CPU usage and sending the records to the standard output, you can see the outgoing data in your /var/log/syslog file.
Fluent Bit is distributed as td-agent-bit package and is available for the latest stable CentOS system. This stable Fluent Bit distribution package is maintained by .
We provide td-agent-bit through a Yum repository. In order to add the repository reference to your system, please add a new file called td-agent-bit.repo in /etc/yum.repos.d/ with the following content:
note: we encourage you always enable the gpgcheck for security reasons. All our packages are signed.
Once your repository is configured, run the following command to install it:
Now the following step is to instruct systemd to enable the service:
If you do a status check, you should see a similar output like this:
The default configuration of td-agent-bit is collecting metrics of CPU usage and sending the records to the standard output, you can see the outgoing data in your /var/log/messages file.
Fluent Bit is distributed as td-agent-bit package and is available for the Raspberry, specifically for . This stable Fluent Bit distribution package is maintained by .
The first step is to add our server GPG key to your keyring, on that way you can get our signed packages:
On Debian and derivated systems such as Raspbian, you need to add our APT server entry to your sources lists, please add the following content at bottom of your /etc/apt/sources.list file:
Now let your system update the apt database:
Using the following apt-get command you are able now to install the latest td-agent-bit:
Now the following step is to instruct systemd to enable the service:
If you do a status check, you should see a similar output like this:
The default configuration of td-agent-bit is collecting metrics of CPU usage and sending the records to the standard output, you can see the outgoing data in your /var/log/syslog file.
We distribute Fluent Bit as packages for specific Enterprise Linux distributions under the name of td-agent-bit. These packages are maintained by .
The following distributions are supported:
Enable output plugin
Enable output plugin
Enable output plugin
Enable output plugin
Tag(s)
Description
1.0, 1.0-debug
Latest release of 1.0.x series
1.0.6, 1.0.6-debug
Container image of Fluent Bit v1.0.6
1.0.5, 1.0.5-debug
Container image of Fluent Bit v1.0.5
1.0.4, 1.0.4-debug
Container image of Fluent Bit v1.0.4
1.0.3, 1.0.3-debug
Container image of Fluent Bit v1.0.3
1.0.2
Container image of Fluent Bit v1.0.2
1.0.1
Container image of Fluent Bit v1.0.1
1.0.0
Container image of Fluent Bit v1.0.0
Fluent Bit comes with some unit test programs that uses the library mode to ingest data and test the output. The tests are based on Google Test suite and requires a C++ compiler.
In order to build and run the tests, your system needs a C++ compiler and an installed version of gtest. On Debian/Ubuntu systems the following commands will install the dependencies:
Note that libgtest-dev will only install the sources of the test suite, you need to take some extra steps to make this work:
By default Fluent Bit have the tests disabled, you need to append the ENABLE_TESTS option to your cmake line, e.g:
To run the tests just issue the following command:
Version | Recipe | Description |
devel | Build Fluent Bit from GIT master. This recipe aims to be used for development and testing purposes only. |
v1.0.6 | Build latest stable version of Fluent Bit. |
Distribution | Version | Codename |
18.04 | Bionic Beaver |
16.04 | Xenial Xerus |
9 | Stretch |
8 | Jessie |
8 | Jessie |
7 |