Loading...
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
Flex (only if Stream Processor is enabled)
Bison (only if Stream Processor is enabled)
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.
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:
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.
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 |
The following article cover the relevant notes for users upgrading from previous Fluent Bit versions. We aim to cover compatibility changes that you must be aware of.
For more details about changes on each release please refer to the Official Release Notes.
If you are migrating from Fluent Bit v1.2 to v1.3, there are not breaking changes. If you are upgrading from an older version please review the incremental changes below.
On Fluent Bit v1.2 we have fixed many issues associated with JSON encoding and decoding, for hence when parsing Docker logs is not longer necessary to use decoders. The new Docker parser looks like this:
Note: again, do not use decoders.
We have done improvements also on how Kubernetes Filter handle the stringified log message. If the option Merge_Log is enabled, it will try to handle the log content as a JSON map, if so, it will add the keys to the root map.
In addition, we have fixed and improved the option called Merge_Log_Key. If a merge log succeed, all new keys will be packaged under the key specified by this option, a suggested configuration is as follows:
As an example, if the original log content is the following map:
the final record will be composed as follows:
If you are upgrading from Fluent Bit <= 1.0.x you should take in consideration the following relevant changes when switching to Fluent Bit v1.1 series:
We introduced a new configuration property called Kube_Tag_Prefix to help Tag prefix resolution and address an unexpected behavior that landed in previous versions.
Duing 1.0.x release cycle, a commit in Tail input plugin changed the default behavior on how the Tag was composed when using the wildcard for expansion generating breaking compatibility with other services. Consider the following configuration example:
The expected behavior is that Tag will be expanded to:
but the change introduced in 1.0 series switched from absolute path to the base file name only:
On Fluent Bit v1.1 release we restored to our default behavior and now the Tag is composed using the absolute path of the monitored file.
Having absolute path in the Tag is relevant for routing and flexible configuration where it also helps to keep compatibility with Fluentd behavior.
This behavior switch in Tail input plugin affects how Filter Kubernetes operates. As you know when the filter is used it needs to perform local metadata lookup that comes from the file names when using Tail as a source. Now with the new Kube_Tag_Prefix option you can specify what's the prefix used in Tail input plugin, for the configuration example above the new configuration will look as follows:
So the proper for Kube_Tag_Prefix value must be composed by Tag prefix set in Tail input plugin plus the converted monitored directory replacing slashes with dots.
We distribute Fluent Bit as packages for specific Enterprise Linux distributions under the name of td-agent-bit. These packages are maintained by Treasure Data, Inc..
The following distributions are supported:
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:
Starting from Kubernetes v1.16, DaemonSet resources are not longer served from extensions/v1beta
. Our current Daemonset Yaml files uses the old apiVersion
.
If you are using Kubernetes v1.16, grab manually a copy of your Daemonset Yaml file and replace the value of apiVersion
from:
to
You can read more about this deprecation on Kubernetes v1.14 Changelog here:
https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.14.md#deprecations
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.
Fluent Bit is distributed as td-agent-bit package and is available for the latest (and old) stable Debian systems: Buster, Stretch and 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.
in normal operation mode allows to be configurable through 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 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 , and 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:
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:
Distribution
Version
Codename
18.04
Bionic Beaver
16.04
Xenial Xerus
10
Buster
9
Stretch
8
Jessie
8
Jessie
7
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 | Builds 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 is distributed as td-agent-bit package and is available for the Raspberry, specifically for Raspbian 8. This stable Fluent Bit distribution package is maintained by Treasure Data, Inc.
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.
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. Current available images can be deployed in multiple architectures.
The following table describe the tags are available on Docker Hub fluent/fluent-bit repository:
It's strongly suggested that you always use the latest image of Fluent Bit.
Our x8664 stable image is based in Distroless focusing on security containing just the Fluent Bit binary and minimal system libraries and basic configuration. Optionally, we provide _debug images for x86_64 which contains Busybox that can be used to troubleshoot or testing purposes.
In addition, the main manifest provides images for arm64v8 and arm32v7 architctectures. From a deployment perspective there is no need to specify an architecture, the container client tool that pulls the image gets the proper layer for the running architecture.
For every architecture we build the layers using the following base images:
Download the last stable image from 1.3 series:
Once the image is in place, now run the following (useless) test which makes Fluent Bit measure CPU usage by the container:
That command will let Fluent Bit measure 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.
Our Docker containers images are deployed thousands of times per day, we take security and stability very seriously.
The latest tag most of the time points to the latest stable image. When we release a major update to Fluent Bit like for example from v1.2.x to v1.3.0, we don't move latest tag until 2 weeks after the release. That give us extra time to verify with our community that everything works as expected.
Fluent Bit 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.
Fluent Bit >= v1.1.x 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 in previous series.
Fluent Bit is distributed as td-agent-bit package for Windows. Fluent Bit has two flavours of Windows installers: a ZIP archive (for quick testing) and an EXE installer (for system installation).
The latest stable version is v1.3.11:
To check the integrity, use Get-FileHash
command on PowerShell.
Download a ZIP archive from the list above. Then you need to expand the ZIP archive. You can do this by clicking "Extract All" on Explorer, or if you're using PowerShell, you can use Expand-Archive
commandlet.
The ZIP package contains the following set of files.
Now, launch cmd.exe or PowerShell on your machine, and execute fluent-bit.exe
as follows.
If you see the following output, it's working fine!
To halt the process, press CTRL-C in the terminal.
Download an EXE installer from the links above. Then, double-click the EXE installer you've downloaded. Installation wizard will automatically start.
Click Next and proceed. By default, Fluent Bit is installed into C:\Program Files\td-agent-bit\
, so you should be able to launch fluent-bit as follow after installation.
Enable output plugin
Enable output plugin
Enable output plugin
Enable output plugin
Tag(s)
Manifest Architectures
Description
1.3
x86_64, arm64v8, arm32v7
Latest release of 1.3.x series.
1.3-debug
x86_64
v1.3.x releases + Busybox
1.3.11
x86_64, arm64v8, arm32v7
Release v1.3.11
1.3.11-debug
x86_64
v1.3.11 release + Busybox
1.3.10
x86_64, arm64v8, arm32v7
Release v1.3.10
1.3.10-debug
x86_64
v1.3.10 release + Busybox
1.3.9
x86_64, arm64v8, arm32v7
Release v1.3.9
1.3.9-debug
x86_64
v1.3.9 release + Busybox
1.3.8
x86_64, arm64v8, arm32v7
Release v1.3.8
1.3.8-debug
x86_64
v1.3.8 release + Busybox
1.3.7
x86_64, arm64v8, arm32v7
Release v1.3.7
1.3.7-debug
x86_64
v1.3.7 release + Busybox
1.3.6
x86_64, arm64v8, arm32v7
Release v1.3.6
1.3.6-debug
x86_64
v1.3.6 release + Busybox
1.3.5
x86_64, arm64v8, arm32v7
Release v1.3.5
1.3.5-debug
x86_64
v1.3.5 release + Busybox
1.3.4
x86_64, arm64v8, arm32v7
Release v1.3.4
1.3.4-debug
x86_64
v1.3.4 release + Busybox
1.3.3
x86_64, arm64v8, arm32v7
Release v1.3.3
1.3.3-debug
x86_64
v1.3.3 release + Busybox
1.3.2
x86_64, arm64v8, arm32v7
Release v1.3.2
1.3.2-debug
x86_64
v1.3.2 release + Busybox
1.3.1
x86_64, arm64v8, arm32v7
Release v1.3.1
1.3.1-debug
x86_64
v1.3.1 release + Busybox
1.3.0
x86_64, arm64v8, arm32v7
Release v1.3.0
1.3.0-debug
x86_64
v1.3.0 release + Busybox
Architecture
Base Image
x86_64
arm64v8
arm64v8/debian:buster-slim
arm32v7
arm32v7/debian:buster-slim
Version
Recipe
Description
devel
Build Fluent Bit from GIT master. This recipe aims to be used for development and testing purposes only.
v1.3.11
Build latest stable version of Fluent Bit.
Installers
SHA256 Checksums
9846538ba849cb2a0e77a75f247e6a59703536b916fb371fc0ac91ee6c372dce
c58128aeff74c98504e871a6b2051f7248d01a77e2a72264e4f3525c21f6b9c8
Installers
SHA256 Checksums
8811e01e25678d20d07e70dddc7846048fdeb08c85292d636ee32d81bcd58ec5
57c2a95e99fab83e2f9d7b834ce110a44c88656f8c38d4a6388c39599314f1bb