TCP/UDP Output
Writes TenXObject instance and template fields via TCP/UDP socket using a log4j2 appender.
For an example configuration see the Fluent Bit TCP output.
Options
Specify the options below to configure multiple TCP/UDP output:
| Name | Description |
|---|---|
| outputSocketProtocol | Network protocol for the socket, either "TCP" or "UDP". |
| outputSocketHost | Host TCP/UDP address to connect and write to |
| outputSocketPort | Endpoint port number |
| outputSocketFields | List of TenXObject field names to encode |
| outputSocketFilter | A JavaScript expression an TenXObject must evaluate as 'truthy' against to be written to this output |
| outputSocketWriteObjects | If true, encode TenXObjects [outputSocketFields](https://doc.log10x.com/run/output/event/socket/#outputsocketfields) to this output |
| outputSocketWriteTemplates | If true, write new TenXTemplates to this output |
| outputSocketEncodeType | The output format in which to encode TenXObject values. Possible values:[json, delimited] |
| outputSocketEncodedLinePrefix | The line prefix prepended to the encoded event if 'outputSocketEncodeType' is 'delimited' |
| outputSocketEncodeDelimiter | The delimiter placed between key and values pairs if 'outputSocketEncodeType' is 'delimited' |
outputSocketProtocol
Network protocol for the socket, either "TCP" or "UDP".
| Type | Default |
|---|---|
| String | "" |
Specifies the Network protocol for the socket, either "TCP" (default) or "UDP".
outputSocketHost
Host TCP/UDP address to connect and write to.
| Type | Default |
|---|---|
| String | 127.0.0.1 |
Specifies a TCP/UDP address to transmit TenXObject instance/template field values.
outputSocketPort
Endpoint port number.
| Type | Required |
|---|---|
| Number | ✔ |
Specifies the port number (e.g., 9000) of the endpoint to transmit data to.
outputSocketFields
List of TenXObject field names to encode.
| Type | Default |
|---|---|
| List | [] |
Specifies a list of TenXObject intrinsic/calculated/extracted field names to extract and write to the output.
outputSocketFilter
A JavaScript expression an TenXObject must evaluate as 'truthy' against to be written to this output.
| Type | Default |
|---|---|
| String | "" |
Specifies a JavaScript expression that an TenXObject must evaluate as truthy to write its instance/template field values to this output. For example, 'outputSocketFilter: this.timestamp' will only emit [timestamped]https://doc.log10x.com/api/js/#TenXBaseObject+timestamped) TenXObjects.
outputSocketWriteObjects
If true, encode TenXObjects [outputSocketFields](https://doc.log10x.com/run/output/event/socket/#outputsocketfields) to this output.
| Type | Default |
|---|---|
| String | true |
Determine whether to write outputSocketFields values of an TenXObject passed to this output. This configuration is typically defined using a JavaScript expression.
To enable/disable the output depending on whether a launch argument, environment variable, or JVM -D option evaluates as truthy, use:
To learn more see TenXEnv.get.
outputSocketWriteTemplates
If true, write new TenXTemplates to this output.
| Type | Default |
|---|---|
| String | false |
Controls whether to write template values of TenXObjects passed to this output. The output will only emit TenXTemplates that the pipeline did not load at startup via the templateFile argument, and will only emit an TenXTemplate once based on its templateHash value.
outputSocketEncodeType
The output format in which to encode TenXObject values. Possible values:[json, delimited].
| Type | Default |
|---|---|
| String | delimited |
Specifies how to encode outputSocketFields values to this output. Possible values:
- json: formats names and values for the current TenXObject as: {"field":"str","field2":1, "field3": true}
- delimited: formats values for the current TenXObject as: "str",1,true The outputSocketEncodeDelimiter argument determines the separator to use.
outputSocketEncodedLinePrefix
The line prefix prepended to the encoded event if 'outputSocketEncodeType' is 'delimited'.
| Type | Default |
|---|---|
| String |
Sets the char which is prepended to the emitted TenXObject field values when outputSocketEncodeType is delimited.
outputSocketEncodeDelimiter
The delimiter placed between key and values pairs if 'outputSocketEncodeType' is 'delimited'.
| Type | Default |
|---|---|
| String |
Sets the char delimiter to separate TenXObject field values when outputSocketEncodeType is delimited.
This module is defined in socket/module.yaml.