Skip to content

Listens for incoming TCP or TLS connections and receives events.

accept_tcp endpoint:string, [tls=record, {}]

Listens on the specified endpoint for incoming TCP connections. For each accepted connection, the operator spawns the nested pipeline and feeds it the bytes received from that connection.

The endpoint to listen on. Must be of the form [tcp://]<hostname>:<port>. Use 0.0.0.0 as the host to accept connections on all interfaces.

TLS configuration. Provide an empty record (tls={}) to enable TLS with defaults or set fields to customize it.

{
skip_peer_verification: bool, // skip certificate verification.
cacert: string, // CA bundle to verify peers.
certfile: string, // client certificate to present.
keyfile: string, // private key for the client certificate.
min_version: string, // minimum TLS version (`"1.0"`, `"1.1"`, `"1.2"`, "1.3"`).
ciphers: string, // OpenSSL cipher list string.
client_ca: string, // CA to validate client certificates.
require_client_cert, // require clients to present a certificate.
}

The client_ca and require_client_cert options are only applied for operators that accept incoming client connections, and otherwise ignored.

Any value not specified in the record will either be picked up from the configuration or if not configured will not be used by the operator.

See the Node TLS Setup guide for more details.

The pipeline to run for each individual TCP connection. If none is specified, no transformations are applied to the output streams. Unless you are sure that there is at most one active connection at a time, it is recommended to specify a pipeline that parses the individual connection streams into events, for instance { read_json }. Otherwise, the output can be interleaved.

Inside the pipeline, the $peer variable is available as a record with the following fields:

FieldTypeDescription
ipipThe IP address of the connected peer
portint64The port number of the connected peer
accept_tcp "0.0.0.0:8090" {
read_json
}
accept_tcp "0.0.0.0:514" {
read_syslog
}
accept_tcp "0.0.0.0:4443", tls={certfile: "cert.pem", keyfile: "key.pem"} {
read_json
}

Last updated: