# Configure Fluent Bit

Fluent Bit uses configuration files to store information about your specified [inputs](https://docs.fluentbit.io/manual/data-pipeline/inputs), [outputs](https://docs.fluentbit.io/manual/data-pipeline/outputs), [filters](https://docs.fluentbit.io/manual/data-pipeline/filters), and more. You can write these configuration files in one of these formats:

* [YAML configuration files](https://docs.fluentbit.io/manual/administration/configuring-fluent-bit/yaml) are the standard configuration format as of Fluent Bit v3.2. They use the `.yaml` file extension.
* [Classic configuration files](https://docs.fluentbit.io/manual/administration/configuring-fluent-bit/classic-mode) will be deprecated at the end of 2026. They use the `.conf` file extension.

## Unit sizes

Some configuration settings in Fluent Bit use standardized unit sizes to define data and storage limits. For example, the `buffer_chunk_size` and `buffer_max_size` parameters for the [Tail](https://docs.fluentbit.io/manual/data-pipeline/inputs/tail) input plugin use unit sizes.

The following table describes the unit sizes you can use and what they mean.

| Suffix               | Description                                                                                                           | Example                           |
| -------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------- |
| *none*               | **Bytes**: If you specify an integer without a unit size, Fluent Bit interprets that value as a bytes representation. | `32000` means 32,000 bytes.       |
| `k`, `kb`, `K`, `KB` | **Kilobytes**: A unit of memory equal to 1,000 bytes.                                                                 | `32k` means 32,000 bytes.         |
| `m`, `mb`, `M`, `MB` | **Megabytes**: A unit of memory equal to 1,000,000 bytes.                                                             | `32m` means 32,000,000 bytes.     |
| `g`, `gb`, `G`, `GB` | **Gigabytes**: A unit of memory equal to 1,000,000,000 bytes.                                                         | `32g` means 32,000,000,000 bytes. |

## Command line interface

Fluent Bit exposes most of its configuration features through the command line interface. Use the `-h` or `--help` flag to see a list of available options.

```shell
# Podman container tooling.
podman run -rm -ti fluent/fluent-bit --help

# Docker container tooling.
docker run --rm -it fluent/fluent-bit --help
```

### Validate configuration with `--dry-run`

Use the `--dry-run` flag to validate a configuration file without starting Fluent Bit:

```shell
fluent-bit --dry-run -c /path/to/fluent-bit.yaml
```

A successful validation prints `configuration test is successful` and exits with code `0`. If validation fails, Fluent Bit exits with a non-zero code and prints the errors to stderr.

As of Fluent Bit 4.2, `--dry-run` performs full property validation in addition to syntax checking. Prior to 4.2, unknown or misspelled plugin property names would only surface as errors at runtime; `--dry-run` now catches them during validation. For example, a configuration with an unknown property on a `dummy` input produces:

```
[error] [config] dummy: unknown configuration property 'invalid_property_that_does_not_exist'.
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fluentbit.io/manual/administration/configuring-fluent-bit.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
