Tcp output plugin v6.0.2
- Plugin version: v6.0.2
- Released on: 2022-03-21
- Changelog
For other versions, see theoverview list.
To learn more about Logstash, see theLogstash Reference.
For questions about the plugin, open a topic in theDiscuss forums. For bugs or feature requests, open an issue inGithub. For the list of Elastic supported plugins, please consult theElastic Support Matrix.
Write events over a TCP socket.
Each event json is separated by a newline.
Can either accept connections from clients or connect to a server, depending onmode
.
This plugin supports the following configuration options plus theCommon options described later.
Setting | Input type | Required |
---|---|---|
host | string | Yes |
mode | string, one of["server", "client"] | No |
port | number | Yes |
reconnect_interval | number | No |
ssl_cacert | a valid filesystem path | No |
ssl_cert | a valid filesystem path | No |
ssl_enable | boolean | No |
ssl_key | a valid filesystem path | No |
ssl_key_passphrase | password | No |
ssl_verify | boolean | No |
Also seeCommon options for a list of options supported by all output plugins.
- This is a required setting.
- Value type isstring
- There is no default value for this setting.
When mode isserver
, the address to listen on. When mode isclient
, the address to connect to.
- Value can be any of:
server
,client
- Default value is
"client"
Mode to operate in.server
listens for client connections,client
connects to a server.
- This is a required setting.
- Value type isnumber
- There is no default value for this setting.
When mode isserver
, the port to listen on. When mode isclient
, the port to connect to.
- Value type isnumber
- Default value is
10
When connect failed,retry interval in sec.
- Value type ispath
- There is no default value for this setting.
The SSL CA certificate, chainfile or CA path. The system CA path is automatically included.
- Value type ispath
- There is no default value for this setting.
SSL certificate path
- Value type isboolean
- Default value is
false
Enable SSL (must be set for otherssl_
options to take effect).
- Value type ispath
- There is no default value for this setting.
SSL key path
- Value type ispassword
- Default value is
nil
SSL key passphrase
- Value type isboolean
- Default value is
false
Verify the identity of the other end of the SSL connection against the CA. For input, sets the fieldsslsubject
to that of the client certificate.
These configuration options are supported by all output plugins:
- Value type iscodec
- Default value is
"json"
The codec used for output data. Output codecs are a convenient method for encoding your data before it leaves the output without needing a separate filter in your Logstash pipeline.
- Value type isboolean
- Default value is
true
Disable or enable metric logging for this specific plugin instance. By default we record all the metrics we can, but you can disable metrics collection for a specific plugin.
- Value type isstring
- There is no default value for this setting.
Add a uniqueID
to the plugin configuration. If no ID is specified, Logstash will generate one. It is strongly recommended to set this ID in your configuration. This is particularly useful when you have two or more plugins of the same type. For example, if you have 2 tcp outputs. Adding a named ID in this case will help in monitoring Logstash when using the monitoring APIs.
output { tcp { id => "my_plugin_id" }}