Reads and parses events from standard input.
from_stdin { … }Description
Section titled “Description”The from_stdin operator reads bytes from standard input and passes them
through the provided parsing pipeline to produce events. This is useful when
piping data into the tenzir executable as part of a shell script or command
chain.
The pipeline to parse the incoming bytes into events. The pipeline receives raw
bytes and must produce events. For example, { read_json } parses the input as
JSON.
Examples
Section titled “Examples”Parse JSON from standard input
Section titled “Parse JSON from standard input”echo '{"foo": 42}' | tenzirfrom_stdin { read_json}{ foo: 42,}Parse CSV data piped from another command
Section titled “Parse CSV data piped from another command”cat data.csv | tenzir -f pipeline.tqlfrom_stdin { read_csv}Parse Syslog messages
Section titled “Parse Syslog messages”tail -f /var/log/syslog | tenzir -f pipeline.tqlfrom_stdin { read_syslog}