> For the complete documentation index, see [llms.txt](https://docs.fluentbit.io/manual/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fluentbit.io/manual/4.2/administration/configuring-fluent-bit/classic-mode/commands.md).

# Commands

Configuration files must be flexible enough for any deployment need, but they must keep a clean and readable format.

Fluent Bit `Commands` extends a configuration file with specific built-in features. The following commands are available:

| Command                | Prototype       | Description                   |
| ---------------------- | --------------- | ----------------------------- |
| [`@INCLUDE`](#include) | `@INCLUDE FILE` | Include a configuration file. |
| [`@SET`](#set)         | `@SET KEY=VAL`  | Set a configuration variable. |

## `@INCLUDE`

Configuring a logging pipeline might lead to an extensive configuration file. In order to maintain a human-readable configuration, split the configuration in multiple files.

The `@INCLUDE` command allows the configuration reader to include an external configuration file:

```
[SERVICE]
    Flush 1

@INCLUDE inputs.conf
@INCLUDE outputs.conf
```

This example defines the main service configuration file and also includes two files to continue the configuration.

Fluent Bit will respects the following order when including:

* Service
* Inputs
* Filters
* Outputs

### `inputs.conf`

The following is an example of an `inputs.conf` file, like the one called in the previous example.

```
[INPUT]
    Name cpu
    Tag  mycpu

[INPUT]
    Name tail
    Path /var/log/*.log
    Tag  varlog.*
```

### `outputs.conf`

The following is an example of an `outputs.conf` file, like the one called in the previous example.

```
[OUTPUT]
    Name   stdout
    Match  mycpu

[OUTPUT]
    Name            es
    Match           varlog.*
    Host            127.0.0.1
    Port            9200
    Logstash_Format On
```

## `@SET`

Fluent Bit supports [configuration variables](/manual/4.2/administration/configuring-fluent-bit/classic-mode/variables.md). One way to expose this variables to Fluent Bit is through setting a shell environment variable, the other is through the `@SET` command.

The `@SET` command can only be used at root level of each line. It can't be used inside a section:

```
// DO NOT USE
@SET my_input=cpu
@SET my_output=stdout

[SERVICE]
    Flush 1

[INPUT]
    Name ${my_input}

[OUTPUT]
    Name ${my_output}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.fluentbit.io/manual/4.2/administration/configuring-fluent-bit/classic-mode/commands.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
