WARNING: Version 6.0 of Metricbeat has passed its EOL date.
This documentation is no longer being maintained and may be removed. If you are running this version, we strongly advise you to upgrade. For the latest information, see the current release documentation.
Configure the File output
editConfigure the File output
editThe File output dumps the transactions into a file where each transaction is in a JSON format. Currently, this output is used for testing, but it can be used as input for Logstash.
output.file: path: "/tmp/metricbeat" filename: metricbeat #rotate_every_kb: 10000 #number_of_files: 7
Configuration options
editYou can specify the following options in the file
section of the metricbeat.yml
config file:
enabled
editThe enabled config is a boolean setting to enable or disable the output. If set to false, the output is disabled.
The default value is true.
path
editThe path to the directory where the generated files will be saved. This option is mandatory.
filename
editThe name of the generated files. The default is set to the Beat name. For example, the files generated by default for Metricbeat would be "metricbeat", "metricbeat.1", "metricbeat.2", and so on.
rotate_every_kb
editThe maximum size in kilobytes of each file. When this size is reached, the files are rotated. The default value is 10240 KB.
number_of_files
editThe maximum number of files to save under path
. When this number of files is reached, the
oldest file is deleted, and the rest of the files are shifted from last to first. The default
is 7 files.
codec
editOutput codec configuration. If the codec
section is missing, events will be json encoded.
See Output codec for more information.