Build and Install

Fluent Bit uses CMake as it build system. The suggested procedure to prepare the build system consists on the following steps:

Prepare environment

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. Note that Fluent Bit requires CMake 3.x. You may need to use cmake3 instead of cmake to complete the following steps on your system.

Change to the build/ directory inside the Fluent Bit sources:

  1. $ cd build/

Let CMake configure the project specifying where the root path is located:

  1. $ cmake ../
  2. -- The C compiler identification is GNU 4.9.2
  3. -- Check for working C compiler: /usr/bin/cc
  4. -- Check for working C compiler: /usr/bin/cc -- works
  5. -- Detecting C compiler ABI info
  6. -- Detecting C compiler ABI info - done
  7. -- The CXX compiler identification is GNU 4.9.2
  8. -- Check for working CXX compiler: /usr/bin/c++
  9. -- Check for working CXX compiler: /usr/bin/c++ -- works
  10. ...
  11. -- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
  12. -- Looking for accept4
  13. -- Looking for accept4 - not found
  14. -- Configuring done
  15. -- Generating done
  16. -- Build files have been written to: /home/edsiper/coding/fluent-bit/build

Now you are ready to start the compilation process through the simple make command:

  1. $ make
  2. Scanning dependencies of target msgpack
  3. [ 2%] Building C object lib/msgpack-1.1.0/CMakeFiles/msgpack.dir/src/unpack.c.o
  4. [ 4%] Building C object lib/msgpack-1.1.0/CMakeFiles/msgpack.dir/src/objectc.c.o
  5. [ 7%] Building C object lib/msgpack-1.1.0/CMakeFiles/msgpack.dir/src/version.c.o
  6. ...
  7. [ 19%] Building C object lib/monkey/mk_core/CMakeFiles/mk_core.dir/mk_file.c.o
  8. [ 21%] Building C object lib/monkey/mk_core/CMakeFiles/mk_core.dir/mk_rconf.c.o
  9. [ 23%] Building C object lib/monkey/mk_core/CMakeFiles/mk_core.dir/mk_string.c.o
  10. ...
  11. Scanning dependencies of target fluent-bit-static
  12. [ 66%] Building C object src/CMakeFiles/fluent-bit-static.dir/flb_pack.c.o
  13. [ 69%] Building C object src/CMakeFiles/fluent-bit-static.dir/flb_input.c.o
  14. [ 71%] Building C object src/CMakeFiles/fluent-bit-static.dir/flb_output.c.o
  15. ...
  16. Linking C executable ../bin/fluent-bit
  17. [100%] Built target fluent-bit-bin

to continue installing the binary on the system just do:

  1. $ make install

it’s likely you may need root privileges so you can try to prefixing the command with sudo.

Build Options

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, Development Options, Input Plugins and _Output Plugins sections.

General Options

option description default
FLB_ALL Enable all features available No
FLB_JEMALLOC Use Jemalloc as default memory allocator No
FLB_TLS Build with SSL/TLS support No
FLB_BINARY Build executable Yes
FLB_EXAMPLES Build examples Yes
FLB_SHARED_LIB Build shared library Yes
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_LUAJIT Enable Lua scripting support Yes
FLB_RECORD_ACCESSOR Enable record accessor Yes
FLB_SIGNV4 Enable AWS Signv4 support Yes
FLB_STATIC_CONF Build binary using static configuration files. The value of this option must be a directory containing configuration files.
FLB_STREAM_PROCESSOR Enable Stream Processor Yes

Development Options

option description default
FLB_DEBUG Build binaries with debug symbols No
FLB_VALGRIND Enable Valgrind support No
FLB_TRACE Enable trace mode No
FLB_SMALL Minimise binary size No
FLB_TESTS_RUNTIME Enable runtime tests No
FLB_TESTS_INTERNAL Enable internal tests No
FLB_TESTS Enable tests No
FLB_BACKTRACE Enable backtrace/stacktrace support Yes

Input Plugins

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:

option description default
FLB_IN_COLLECTD Enable Collectd input plugin On
FLB_IN_CPU Enable CPU input plugin On
FLB_IN_DISK Enable Disk I/O Metrics input plugin On
FLB_IN_DOCKER Enable Docker metrics input plugin On
FLB_IN_EXEC Enable Exec input plugin On
FLB_IN_FORWARD Enable Forward input plugin On
FLB_IN_HEAD Enable Head input plugin On
FLB_IN_HEALTH Enable Health input plugin On
FLB_IN_KMSG Enable Kernel log input plugin On
FLB_IN_MEM Enable Memory input plugin On
FLB_IN_MQTT Enable MQTT Server input plugin On
FLB_IN_NETIF Enable Network I/O metrics input plugin On
FLB_IN_PROC Enable Process monitoring input plugin On
FLB_IN_RANDOM Enable Random input plugin On
FLB_IN_SERIAL Enable Serial input plugin On
FLB_IN_STDIN Enable Standard input plugin On
FLB_IN_SYSLOG Enable Syslog input plugin On
FLB_IN_SYSTEMD Enable Systemd / Journald input plugin On
FLB_IN_TAIL Enable Tail (follow files) input plugin On
FLB_IN_TCP Enable TCP input plugin On
FLB_IN_THERMAL Enable system temperature(s) input plugin On
FLB_IN_WINLOG Enable Windows Event Log input plugin (Windows Only) On

Filter Plugins

The filter plugins allows to modify, enrich or drop records. The following table describes the filters available on this version:

option description default
FLB_FILTER_AWS Enable AWS metadata filter On
FLB_FILTER_EXPECT Enable Expect data test filter On
FLB_FILTER_GREP Enable Grep filter On
FLB_FILTER_KUBERNETES Enable Kubernetes metadata filter On
FLB_FILTER_LUA Enable Lua scripting filter On
FLB_FILTER_MODIFY Enable Modify filter On
FLB_FILTER_NEST Enable Nest filter On
FLB_FILTER_PARSER Enable Parser filter On
FLB_FILTER_RECORD_MODIFIER Enable Record Modifier filter On
FLB_FILTER_REWRITE_TAG Enable Rewrite Tag filter On
FLB_FILTER_STDOUT Enable Stdout filter On
FLB_FILTER_THROTTLE Enable Throttle filter On

Output Plugins

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:

option description default
FLB_OUT_AZURE Enable Microsoft Azure output plugin On
FLB_OUT_BIGQUERY Enable Google BigQuery output plugin On
FLB_OUT_COUNTER Enable Counter output plugin On
FLB_OUT_CLOUDWATCH_LOGS Enable Amazon CloudWatch output plugin On
FLB_OUT_DATADOG Enable Datadog output plugin On
FLB_OUT_ES Enable Elastic Search output plugin On
FLB_OUT_FILE Enable File output plugin On
FLB_OUT_FLOWCOUNTER Enable Flowcounter output plugin On
FLB_OUT_FORWARD Enable Fluentd output plugin On
FLB_OUT_GELF Enable Gelf output plugin On
FLB_OUT_HTTP Enable HTTP output plugin On
FLB_OUT_INFLUXDB Enable InfluxDB output plugin On
FLB_OUT_KAFKA Enable Kafka output Off
FLB_OUT_KAFKA_REST Enable Kafka REST Proxy output plugin On
FLB_OUT_LIB Enable Lib output plugin On
FLB_OUT_NATS Enable NATS output plugin Off
FLB_OUT_NULL Enable NULL output plugin On
FLB_OUT_PGSQL Enable PostgreSQL output plugin On
FLB_OUT_PLOT Enable Plot output plugin On
FLB_OUT_SLACK Enable Slack output plugin On
FLB_OUT_SPLUNK Enable Splunk output plugin On
FLB_OUT_STACKDRIVER Enable Google Stackdriver output plugin On
FLB_OUT_STDOUT Enable STDOUT output plugin On
FLB_OUT_TCP Enable TCP/TLS output plugin On
FLB_OUT_TD Enable Treasure Data output plugin On