$linuxjunkies
>

fluent-bit(8)

Fluent Bit is a lightweight log processor and forwarder that collects logs from various sources and sends them to multiple destinations.

UbuntuDebianFedoraArch

Synopsis

fluent-bit [OPTION]... [-c CONFIG_FILE]

Description

Fluent Bit is a fast and lightweight log processor and forwarder written in C. It reads logs from system sources (files, syslog, systemd journal), transforms them, and routes them to backends like Elasticsearch, Splunk, S3, Kafka, and HTTP endpoints. Designed for containerized environments and edge computing with minimal resource overhead.

The tool uses a plugin-based architecture with input plugins (sources), filter plugins (transformations), and output plugins (destinations). Configuration is typically done via a main config file plus separate input, filter, and output sections.

Common options

FlagWhat it does
-c, --config=FILEpath to the configuration file to load
-e, --plugin=PLUGINload an external plugin (e.g., lua script)
-i, --input=PLUGINspecify input plugin(s) inline
-o, --output=PLUGINspecify output plugin(s) inline
-f, --filter=PLUGINspecify filter plugin(s) inline
-p, --prop="KEY=VALUE"set plugin properties from command line
-v, --verboseincrease verbosity level (can be used multiple times)
-q, --quietdecrease verbosity; suppress normal output
-d, --daemonrun fluent-bit as a background daemon
--dry-runvalidate configuration without running the pipeline
--versionshow version and exit
-h, --helpdisplay help message and exit

Examples

start fluent-bit with the standard configuration file

fluent-bit -c /etc/fluent-bit/fluent-bit.conf

read logs from a file and print them to stdout (tail input, stdout output)

fluent-bit -i tail -p Path=/var/log/app.log -o stdout

collect CPU metrics and send them to Elasticsearch

fluent-bit -i cpu -o es -p Host=elasticsearch -p Port=9200 -p Index=metrics

run with verbose logging to debug configuration issues

fluent-bit -c fluent-bit.conf -v

validate the configuration file syntax without starting the service

fluent-bit --dry-run -c /etc/fluent-bit/fluent-bit.conf

start fluent-bit as a daemon process in the background

fluent-bit -d -c /etc/fluent-bit/fluent-bit.conf

collect from syslog and files, forward to Kafka broker

fluent-bit -i syslog -i files -o kafka -p brokers=localhost:9092 -p topics=logs

display fluent-bit version number

fluent-bit -c fluent-bit.conf --version

Related commands