STDIN

Example Configuration

STDIN line

Config
Input
Output
1[sources.my_source_id]
2type = "stdin"
1"2019-02-13T19:48:34+00:00 [info] Started GET \"/\" for 127.0.0.1"
1{
2 "log": {
3 "timestamp": "2020-10-10T17:07:36.452332Z",
4 "message": "2019-02-13T19:48:34+00:00 [info] Started GET \"/\" for 127.0.0.1",
5 "host": "my-host.local"
6 }
7}

Configuration Options

Required Options

type(required)

The component type. This is a required field for all components and tells Vector which component to use.

TypeSyntaxDefaultExample
stringliteral["stdin"]

Advanced Options

host_key(optional)

The key name added to each event representing the current host. This can also be globally set via the global host_key option.

TypeSyntaxDefaultExample
stringliteralhost
max_length(optional)

The maximum bytes size of a message before rest of it will be discarded.

TypeSyntaxDefaultExample
uint102400

How it Works

Line Delimiters

Each line is read until a new line delimiter, the 0xA byte, is found.

State

This component is stateless, meaning its behavior is consistent across each input.

Context

By default, the stdin source augments events with helpful context keys.