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