arrow-left
All pages
gitbookPowered by GitBook
1 of 1

Loading...

File

The file output plugin allows to write the data received through the input plugin to file.

hashtag
Configuration Parameters

The plugin supports the following configuration parameters:

Key

Description

hashtag
Format

hashtag
out_file format

Output time, tag and json records. There is no configuration parameters for out_file.

hashtag
plain format

Output the records as JSON (without additional tag and timestamp attributes). There is no configuration parameters for plain format.

hashtag
csv format

Output the records as csv. Csv supports an additional configuration parameter.

hashtag
ltsv format

Output the records as LTSV. LTSV supports an additional configuration parameter.

hashtag
Getting Started

You can run the plugin from the command line or through the configuration file:

hashtag
Command Line

From the command line you can let Fluent Bit count up a data with the following options:

hashtag
Configuration File

In your main configuration file append the following Input & Output sections:

Path

File path to output. If not set, the filename will be tag name.

Format

The format of the file content. See also Format section. Default: out_file.

Key

Description

Delimiter

The character to separate each data. Default: ','

Key

Description

Delimiter

The character to separate each pair. Default: '\t'(TAB)

Label_Delimiter

The character to separate label and the value. Default: ':'

tag: [time, {"key1":"value1", "key2":"value2", "key3":"value3"}]
{"key1":"value1", "key2":"value2", "key3":"value3"}
time[delimiter]"value1"[delimiter]"value2"[delimiter]"value3"
field1[label_delimiter]value1[delimiter]field2[label_delimiter]value2\n
$ fluent-bit -i cpu -o file -p path=output.txt
[INPUT]
    Name cpu
    Tag  cpu

[OUTPUT]
    Name file
    Match *
    Path output.txt