Skip to content

read_all

Parses an incoming bytes stream into a single event.

read_all [binary=bool]

The read_all operator takes its input bytes and produces a single event that contains everything. This is useful if the entire stream is needed for further processing at once.

The resulting events have a single field called data.

Treat the input as binary data instead of UTF-8 text. When enabled, invalid UTF-8 sequences will not cause warnings, and the resulting data field will be of type blob instead of string.

Read an entire text file into a single event

Section titled “Read an entire text file into a single event”
load_file "data.txt"
read_all
{data: "<file contents>"}

Read an entire binary file into a single event

Section titled “Read an entire binary file into a single event”
load_file "data.bin"
read_all binary=true
{data: b"<file contents>"}

read_delimited, read_delimited_regex, read_lines,

Last updated: