files

Reads files from a path, where each discrete file will be consumed as a single message.

# Config fields, showing default values
input:
files:
path: ""
delete_files: false

The path can either point to a single file (resulting in only a single message) or a directory, in which case the directory will be walked and each file found will become a message.

Metadata

This input adds the following metadata fields to each message:

- path

You can access these metadata fields using function interpolation.

Fields

path

A path to either a directory or a file.

Type: string
Default: ""

delete_files

Whether to delete files once they are consumed.

Type: bool
Default: false