File
The File output plugin lets you write the data received through the input plugin to file.
Configuration parameters
The plugin supports the following configuration parameters:
Path
Directory path to store files. If not set, Fluent Bit will write the files on it's own positioned directory. Available in Fluent Bit 1.4.6 and later.
none
File
Set filename to store the records. If not set, the filename will be the tag associated with the records.
none
Mkdir
Recursively create output directory if it doesn't exist. Permissions set to 0755.
none
Format
This plugin uses the following formats:
out_file
out_fileOutput time, tag, and json records. There are no configuration parameters for out_file.
tag: [time, {"key1":"value1", "key2":"value2", "key3":"value3"}]Plain
Output the records as JSON (without additional tag and timestamp attributes). There are no configuration parameters for plain format.
CSV
Output the records in CSV format. CSV mode supports an additional configuration parameter.
Delimiter
The character to separate each data. Accepted values: \t (or tab), (space), or , (comma). Other values are ignored and will use default silently. Default: ,
LTSV
Output the records in LTSV format. LTSV mode supports an additional configuration parameter.
Delimiter
The character to separate each pair. Default: t (TAB)
Label_Delimiter
The character to separate label and the value. Default: :
Template
Output the records using a custom format template.
Template
The format string. Default: {time} {message}
This accepts a formatting template and fills placeholders using corresponding values in a record.
For example, if you set up the configuration like the following:
You will get the following output:
Get started
You can run the plugin from the command line or through the configuration file.
Command line
From the command line you can let Fluent Bit count up a data with the following options:
Configuration file
In your main configuration file append the following:
Last updated
Was this helpful?