Output: tcp
Send data to a TCP server
Note that if there is a break in connection, there may be data loss, although we do try to buffer data until reconnection is possible. If a more robust transport is needed, use http (or even rabbitmq).
Field Summary
Field Name | Type | Description | Default |
---|---|---|---|
batch | integer or the 'document' | Maximum number of events in an output batch. If 'document' send on end of document | - |
timeout | interval | Interval after which the batch is sent, to keep throughput going | 100ms |
header | templated text | Put a header line before the batch | - |
footer | templated text | Put a header line after the last line of the batch | - |
use-document-marker | bool | Enrich the pipe metadata with a document marker (for document handling in batch mode) | false |
address | string | Destination TCP address | - |
input-field | field | A field from where data is to be read, meaning JSON is assumed | - |
retry | Retry | For operations that could potentially fail | - |
server | bool | Operate as a server | false |
Fields
batch
Type: integer or the 'document'
Maximum number of events in an output batch. If 'document' send on end of document
timeout
Type: interval
Default: 100ms
Interval after which the batch is sent, to keep throughput going
header
Type: templated text
Put a header line before the batch
footer
Type: templated text
Put a header line after the last line of the batch
use-document-marker
Type: bool
Default: false
Enrich the pipe metadata with a document marker (for document handling in batch mode)
address
Type: string
Destination TCP address
Example
Pipe Language Snippet:
tcp:
address: 127.0.0.1:8000
input-field
Type: field
A field from where data is to be read, meaning JSON is assumed
Otherwise the whole event is sent
Example
Pipe Language Snippet:
tcp:
address: 127.0.0.1:8000
input-field: one
retry
Type: Retry
For operations that could potentially fail
Field Name | Type | Description | Default |
---|---|---|---|
count | integer | How many attempts to make before declaring failure | - |
pause | duration | How long to pause before re-trying | - |
forever | bool | Keep trying until success is declared | false |
count
Type: integer
How many attempts to make before declaring failure
Example
Pipe Language Snippet:
exec:
command: echo 'one two'
retry:
count: 1
Output:
{"_raw":"one two"}
pause
Type: duration
How long to pause before re-trying
Accepts human-friendly formats, like 1m (for 1 minute) and 4h (for 4 hours)
Example
Pipe Language Snippet:
exec:
command: echo 'one two'
retry:
count: 6
pause: 10s
Output:
{"_raw":"one two"}
forever
Type: bool
Default: false
Keep trying until success is declared
Accepts human-friendly formats, like 1m (for 1 minute) and 4h (for 4 hours)
Example
Pipe Language Snippet:
exec:
command: echo 'one two'
retry:
forever: true
Output:
{"_raw":"one two"}
server
Type: bool
Default: false
Operate as a server
This is where each tcp input connecting to it will receive a copy (fan-out)