Input: tcp
Listen for incoming TCP connections (or write to existing server)
Note that if there is a break in connection, there may be data loss. If a more robust transport is needed, use http (or even rabbitmq).
Field Summary
Field Name | Type | Description | Default |
---|---|---|---|
address | host:port | The bind address for the socket in ip address:host format. | - |
plain | bool | Extract only the payload, ignoring metadata | false |
raw | bool | Do not wrap incoming data in JSON format (i.e. `{"_raw":"some data"}) | false |
client | bool | Treat as TCP client, not server. Then a server must be listening on the specified port | false |
ignore-line-breaks | bool | Do not treat separate lines as distinct events | false |
encoding | string | The encoding for plain text received | UTF-8 |
line-size | integer | The maximum number of bytes after which a linebreak is enforced | 10000 |
Fields
address
Type: host:port
The bind address for the socket in ip address:host
format.
Example
Pipe Language Snippet:
tcp:
address: 127.0.0.1:8000
plain
Type: bool
Default: false
Extract only the payload, ignoring metadata
If this is false
, you get these fields in the event, otherwise just contents of _raw
_raw
the datasource_ip
source_port
received_time
receiver_port
protocol
"#TCP"
Example
Pipe Language Snippet:
tcp:
address: 127.0.0.1:8000
plain: true
raw
Type: bool
Alias: json
Default: false
Do not wrap incoming data in JSON format (i.e. `{"_raw":"some data"})
This is often useful when incoming data is already in JSON format.
Example
Pipe Language Snippet:
tcp:
address: 127.0.0.1:8000
raw: true
client
Type: bool
Default: false
Treat as TCP client, not server. Then a server must be listening on the specified port
ignore-line-breaks
Type: bool
Alias: ignore-linebreaks
Default: false
Do not treat separate lines as distinct events
Example
Pipe Language Snippet:
tcp:
address: 127.0.0.1:8000
ignore-linebreaks: true
encoding
Type: string
Default: UTF-8
The encoding for plain text received
line-size
Type: integer
Default: 10000
The maximum number of bytes after which a linebreak is enforced