Build with Static Configuration
Fluent Bit in normal operation mode is configurable throughtext files or using specific arguments in the command line. Although this is the ideal deployment case, there are scenarios where a more restricted configuration is required. Static configuration mode restricts configuration ability.
Static configuration mode includes a built-in configuration in the final binary of Fluent Bit, disabling the usage of external files or flags at runtime.
Get started
Requirements
The following steps assume you are familiar with configuring Fluent Bit using text files and you have experience building it from scratch as described inBuild and Install.
Configuration Directory
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. This
directory must contain a minimum of one configuration file calledfluent-bit.conf
containing the requiredSERVICE,INPUT, and OUTPUT
sections.
As an example, create a new fluent-bit.conf
file with the following
content:
This configuration calculates CPU metrics from the running system and prints them to the standard output interface.
Build with custom configuration
Go to the Fluent Bit source code build directory:
Run CMake, appending the
FLB_STATIC_CONF
option pointing to the configuration directory recently created:Build Fluent Bit:
The generated fluent-bit
binary is ready to run without additional configuration:
Last updated
Was this helpful?