Fluent Bit Fluent Bit not respecting log levels

Log level settings are not correctly configured, causing Fluent Bit to ignore them.

Understanding Fluent Bit

Fluent Bit is a lightweight and high-performance log processor and forwarder. It is designed to collect data from various sources, process it, and deliver it to different destinations such as Elasticsearch, Kafka, or other logging services. Fluent Bit is part of the Fluentd ecosystem and is often used in environments where resource efficiency is critical, such as edge computing or IoT devices.

Identifying the Symptom

One common issue users encounter is Fluent Bit not respecting the configured log levels. This means that despite setting a specific log level, Fluent Bit continues to output logs at different levels, which can lead to unnecessary verbosity or missing critical logs.

Observed Behavior

Users may notice that Fluent Bit outputs logs at levels that do not match the configured settings. For example, setting the log level to error but still receiving info or debug logs.

Exploring the Issue

The root cause of Fluent Bit not respecting log levels often lies in incorrect configuration settings. Fluent Bit uses a configuration file where the log level is specified, but if this setting is not correctly applied or if there are multiple conflicting settings, Fluent Bit may not behave as expected.

Configuration File

The log level is typically set in the fluent-bit.conf file under the [SERVICE] section. The relevant parameter is Log_Level, which can be set to error, warn, info, or debug.

Steps to Resolve the Issue

To ensure Fluent Bit respects the log level settings, follow these steps:

Step 1: Verify Configuration

Open your Fluent Bit configuration file, typically named fluent-bit.conf. Locate the [SERVICE] section and ensure the Log_Level parameter is set correctly. For example:

[SERVICE]
Log_Level info

Ensure there are no conflicting log level settings elsewhere in the configuration.

Step 2: Restart Fluent Bit

After making changes to the configuration file, restart the Fluent Bit service to apply the new settings. Use the following command:

sudo systemctl restart fluent-bit

Or, if you are running Fluent Bit in a container, restart the container:

docker restart fluent-bit

Step 3: Validate the Changes

Check the Fluent Bit logs to ensure that the log level is now being respected. You can use the following command to view the logs:

journalctl -u fluent-bit -f

Or, if using Docker:

docker logs -f fluent-bit

Additional Resources

For more detailed information on Fluent Bit configuration, refer to the official Fluent Bit documentation. If you continue to experience issues, consider reaching out to the Fluent Bit community on GitHub for support.

Master

Fluent Bit

in Minutes — Grab the Ultimate Cheatsheet

(Perfect for DevOps & SREs)

Most-used commands
Real-world configs/examples
Handy troubleshooting shortcuts
Your email is safe with us. No spam, ever.

Thankyou for your submission

We have sent the whitepaper on your email!
Oops! Something went wrong while submitting the form.

Fluent Bit

Cheatsheet

(Perfect for DevOps & SREs)

Most-used commands
Your email is safe with us. No spam, ever.

Thankyou for your submission

We have sent the whitepaper on your email!
Oops! Something went wrong while submitting the form.

MORE ISSUES

Made with ❤️ in Bangalore & San Francisco 🏢

Doctor Droid