Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Convert unstructured messages to structured messages
Dealing with raw strings or unstructured messages is difficult. Having a structure makes data more usable. Set a structure to the incoming data by using input plugins as data is collected:
The parser converts unstructured data to structured data. As an example, consider the following Apache (HTTP Server) log entry:
This log line is a raw string without format. Structuring the log makes it easier to process the data later. If the regular expression parser is used, the log entry could be converted to:
Parsers are fully configurable and are independently and optionally handled by each input plugin. For more details, see Parsers.
Learn about destinations for your data, such as databases and cloud services.
The output interface lets you define destinations for your data. Common destinations are remote services, local file systems, or other standard interfaces. Outputs are implemented as plugins.
When an output plugin is loaded, an internal instance is created. Every instance has its own independent configuration. Configuration keys are often called properties.
Every output plugin has its own documentation section specifying how it can be used and what properties are available.
For more details, see Output Plugins.
Modify, enrich or drop your records
In production environments you need full control of the data you're collecting. Filtering lets you alter the collected data before delivering it to a destination.
Filtering is implemented through plugins. Each available filter can be used to match, exclude, or enrich your logs with specific metadata.
Fluent Bit support many filters. A common use case for filtering is Kubernetes deployments. Every pod log needs the proper metadata associated with it.
Like input plugins, filters run in an instance context, which has its own independent configuration. Configuration keys are often called properties.
For more details about the Filters available and their usage, see Filters.
The way to gather data from your sources
Fluent Bit provides input plugins to gather information from different sources. Some plugins collect data from log files, while others can gather metrics information from the operating system. There are many plugins to suit different needs.
When an input plugin loads, an internal instance is created. Each instance has its own independent configuration. Configuration keys are often called properties.
Every input plugin has its own documentation section that specifies how to use it and what properties are available.
For more details, see Input Plugins.
Data processing with reliability
The buffer
phase in the pipeline aims to provide a unified and persistent mechanism to store your data, using the primary in-memory model or the file system-based mode.
The buffer
phase contains the data in an immutable state, meaning that no other filter can be applied.
Buffered data uses the Fluent Bit internal binary representation, which isn't raw text.
Fluent Bit offers a buffering mechanism in the file system that acts as a backup system to avoid data loss in case of system failures.
Create flexible routing rules
Routing is a core feature that lets you route your data through filters and then to one or multiple destinations. The router relies on the concept of Tags and Matching rules.
There are two important concepts in Routing:
Tag
Match
When data is generated by an input plugin, it comes with a Tag
. A Tag is a human-readable indicator that helps to identify the data source. Tags are usually configured manually.
To define where to route data, specify a Match
rule in the output configuration.
Consider the following configuration example that delivers CPU
metrics to an Elasticsearch database and Memory (mem
) metrics to the standard output interface:
Routing reads the Input
Tag
and the Output
Match
rules. If data has a Tag
that doesn't match at routing time, the data is deleted.
Routing is flexible enough to support wildcards in the Match
pattern. The following example defines a common destination for both sources of data:
The match rule is set to my_*
, which matches any Tag starting with my_*
.
Routing also provides support for regular expressions with the Match_Regex
pattern, allowing for more complex and precise matching criteria. The following example demonstrates how to route data from sources based on a regular expression:
In this configuration, the Match_regex
rule is set to .*_sensor_[AB]
. This regular expression matches any Tag
that ends with _sensor_A
or _sensor_B
, regardless of what precedes it. This approach provides a more flexible and powerful way to handle different source tags with a single routing rule.