Read events over a TCP socket.
Like stdin and file inputs, each event is assumed to be one line of text.
Can either accept connections from clients or connect to a server,
depending on mode.
input {
tcp {
add_field => ... # hash (optional), default: {}
data_timeout => ... # number (optional), default: 5
debug => ... # boolean (optional)
format => ... # ["plain", "json", "json_event"] (optional)
host => ... # string (optional), default: "0.0.0.0"
message_format => ... # string (optional)
mode => ... # ["server", "client"] (optional), default: "server"
port => ... # number (required)
tags => ... # array (optional)
type => ... # string (required)
}
}
Add a field to an event
Read timeout in seconds. If a particular tcp connection is idle for more than this timeout period, we will assume it is dead and close it. If you never want to timeout, use -1.
Set this to true to enable debugging on an input.
The format of input data (plain, json, json_event)
When mode is server, the address to listen on.
When mode is client, the address to connect to.
If format is "json", an event sprintf string to build what the display @message should be given (defaults to the raw JSON). sprintf format strings look like %{fieldname} or %{@metadata}.
Mode to operate in. server listens for client connections,
client connects to a server.
When mode is server, the port to listen on.
When mode is client, the port to connect to.
Add any number of arbitrary tags to your event.
This can help with processing later.
Label this input with a type. Types are used mainly for filter activation.
If you create an input with type "foobar", then only filters which also have type "foobar" will act on them.
The type is also stored as part of the event itself, so you can also use the type to search for in the web interface.